Can I influence a collision deflection

OgreMage

02-05-2008 23:07:10

Hello NxOgre,
If two objects collide (Im using PhysX NxOgre), can I have one of them influence the deflection direction besides just their shapes. Meaning, lets say I apply force to a Box into a Capsule but I really want to guarantee it bounces back more than it sliding off the Capsule. This matters to me because my objects are in motion and I need a desired effect. It would seem to me that such a feature should exist for many cases, for example when you bounce something on a Sofa cushion it, its deflection is quite adjusted compared to bouncing on a Tile floor.

I am very eager for the solution/answer, so please respond!
Thank you dearly,
OM

betajaen

03-05-2008 09:00:12

The first though that came into my head would be to have a cushion and floor group. Have a collision callback and add an additional force on the inverse normal of the collision with the cushion and floor.

I suppose the other way is just to have a high restitution material on the cushion and normal one the floor. But that's not exactly what you want.

OgreMage

03-05-2008 17:01:00

I did end up solving this problem with collision groups and it's working close enough. Thank you, I am going to mark this solved since there does not appear to be any way of setting a value to a Body to have it have significant influence on a collision deflection direction.

Thanks again!