As the title states:
Is there a way to determine which normal you came out of from a trigger collision?
Basically if I’m leaving the EAST side of a cube, how can I determine that? Or is there another way of thinking of this.
As the title states:
Is there a way to determine which normal you came out of from a trigger collision?
Basically if I’m leaving the EAST side of a cube, how can I determine that? Or is there another way of thinking of this.
The event fired when leaving a trigger volume (triggerleave) returns the entity only that exits the volume:
https://developer.playcanvas.com/en/api/pc.CollisionComponent.html#event:triggerleave
So to do that you will have to code some basic maths:
Helpful thread on how to find the angle given two vectors (your positions):