How do I set up collision detection?

Hi. Hereis the situation: I want to create a trait associated to rigid objects. I want some function to be triggered when the object collisions with a certain object. How can I set up this collision event in haxe scripts?

I have the same question. I’ll probably ask a new question.

In your update function just call PhysicsWorld.getContacts(), to get the contacts of the object. If you need more information you can call PhysicsWorld.getContactPairs() instead.

1 Like