java.lang.Object
technology.sola.engine.physics.utils.ColliderUtils
ColliderUtils is a collection of utility methods for configuring
ColliderComponent.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidautoSizeColliderToSprite(technology.sola.ecs.Entity entity, SpriteSheet spriteSheet)
-
Method Details
-
autoSizeColliderToSprite
public static void autoSizeColliderToSprite(technology.sola.ecs.Entity entity, SpriteSheet spriteSheet) Auto sizes anEntity'sColliderComponentusing itsSpriteComponent. This replaces the initial collider using the sprite's dimensions. If the initial collider is aColliderShapeCirclethen additional offset will be added to the collider if the sprite's dimensions are not equal.- Parameters:
entity- theEntityspriteSheet- theSpriteSheet
-