How to update collisionshape of the body

abhinandan

16-03-2007 04:17:05

Hi,
Can any one tell me is there anyway to update the collision shape of the body on the fly, when I tried calculating the collision shape for a scenenode in frame listener the application crashes, so is there any other way to do this..?

thank you in advance
Abhinandan

nikhil

17-03-2007 08:01:05

none that I know of..

You can create new collision bodies, remove the previous one and attach the new one to your body inside the frame listener.. I've not tried it but I'm damn sure it'll bring the system on it's knees..

regards

abhinandan

20-03-2007 13:30:23

Thank you for the replay
Initially I tried with it but whenever i was creating new collision shape in side my frame listener the application use to crash I think there is something with the way I am creating it, I'll try again with

nikhil

21-03-2007 04:44:29

Thank you for the replay
Initially I tried with it but whenever i was creating new collision shape in side my frame listener the application use to crash I think there is something with the way I am creating it, I'll try again with


you can try this

OgreNewt::Collision* col = new OgreNewt::CollisionPrimitives::Ellipsoid(blah blah);
newtBody->setCollision( col );