Package com.csse3200.game.physics
Class PhysicsUtils
java.lang.Object
com.csse3200.game.physics.PhysicsUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetCustomCollider(Entity entity, float sizeX, float sizeY, float posX, float posY) Modifies the collider of an entity to be a rectangle of a specified size with the corner being in the specified relative coordinatesstatic voidsetScaledCollider(Entity entity, float scaleX, float scaleY)
-
Method Details
-
setScaledCollider
-
setCustomCollider
public static void setCustomCollider(Entity entity, float sizeX, float sizeY, float posX, float posY) Modifies the collider of an entity to be a rectangle of a specified size with the corner being in the specified relative coordinates- Parameters:
entity- the entity the collider is bound tosizeX- the length of the new collision boxsizeY- the height of the new collision boxposX- the relative x coordinate of the top left corner of the collision boxposY- the relative y coordinate of the top left corner of the collision box
-