Collision event, normal direction
Posted: Wed Nov 28, 2018 9:13 am
Hi,
I currently try to build an abstraction layer on top of the bepu collision events. For simplicity I only plan to expose the InitialCollisionDetected and CollisionEnded event.
When the InitialCollisionDetected event occurs I want to forward the colliding game entities (stored in the tag), the collision point and the collision normal. For this I just forward the data in the first contact in the CollidablePairHandler. This works well except for the collision normal.
My problem is that if 2 entities collide which both have subscribed to the InitialCollisionDetected event they both get notified but with the same collision normal. I would expect the normals to face in the opposite direction (away from the entity they collided with).
Is their a way to get a behavior like this or is my expectation for the normals just wrong?
I currently try to build an abstraction layer on top of the bepu collision events. For simplicity I only plan to expose the InitialCollisionDetected and CollisionEnded event.
When the InitialCollisionDetected event occurs I want to forward the colliding game entities (stored in the tag), the collision point and the collision normal. For this I just forward the data in the first contact in the CollidablePairHandler. This works well except for the collision normal.
My problem is that if 2 entities collide which both have subscribed to the InitialCollisionDetected event they both get notified but with the same collision normal. I would expect the normals to face in the opposite direction (away from the entity they collided with).
Is their a way to get a behavior like this or is my expectation for the normals just wrong?