Posts

Post not yet marked as solved
0 Replies
228 Views
I'm working on a game where it would be helpful to know whether a given Entity is currently colliding with any other Entities. The collider shape is not guaranteed to be simple — they're each constructed with multiple ShapeResources for accuracy. The Entity in question does not have a physics body, can be dragged freely, and should be able to overlap with other Entities with or without physics bodies, but all with CollisionComponents. The problem I'm running into is that using CollisionEvents.Began and CollisionEvents.Ended creates a situation where an Entity can be dragged over another, briefly switches to my "overlapping" state (the red semitransparent object), but then immediately switches back as soon as the object is dragged any further (the pink semitransparent object)— indicating CollisionEvents.Ended is being called while the Entities are still colliding. Both should be in the "overlapping" state on the left. tl;dr — Is there a simple way I'm unaware of to check whether there are any currently active collisions on an Entity? Or some other way of thinking about this that may be beneficial?
Posted
by ggliner.
Last updated
.