Closed novialriptide closed 11 months ago
Looking into this further, Fixture
does not provide parameters or attributes where you can specify where its position is.
A way to go around this from Reign.Engine
is to make the components RigidBody2D
and BoxCollider2D
both contain Reign.Physics2D.Body
as an attribute.
BoxCollider2D
will contain its own Reign.Physics2D.Body
linked with its own Reign.Physics2D.Fixture
but only if it's not linked with a RigidBody2D
. If linked with a RigidBody2D
then Reign.Physics2D.Body
contained within BoxCollider2D
will hibernate.
The behavior of RigidBody2D
will remain the same.
For
Reign.Engine
(private close-sourced project), I require a collider that can be detected if it's being collided with even without a rigid body; it would be helpful ifOnCollisionEventHandler
andOnSeparationEventHandler
worked without a body.