different collisions

Empaler

10-02-2010 23:52:50

Hi,

In my project i have 2 types of collisions and i need to do different stuff when they occur.
1st type is when the player collide with the bsp map and the 2nd type is when the player collide with an object box.

How can i do that?

Thanks

betajaen

11-02-2010 14:22:44

When you create your PhysX TriangleMesh, assign that to say shape group 1, then the other bits you can assign to shape group 2. That way you can quickly tell them apart from group numbers.

LucaMoller

13-02-2010 17:38:48

When you create your PhysX TriangleMesh, assign that to say shape group 1, then the other bits you can assign to shape group 2. That way you can quickly tell them apart from group numbers.

And then, inside the collision callback method for the player you identify the group of other object it is colliding with, and then you do what you want deppending the group and what it is meant for.