l34ndr4
27-04-2006 22:55:40
hi,
I wanted to know if there si some kind of method
for stopping the forces instantly, or deleting them from an object.
CaseyB
27-04-2006 23:20:06
You just need to apply an equal and opposite force!
l34ndr4
28-04-2006 05:01:41
is there not like another way?
like a function that says "object.stopForces();"
its an physic emulation world not a real one.
CaseyB
28-04-2006 05:35:06
iits an physic emulation world not a real one.
The point of the physics emulation is to as closely simulate the real world as possible. Otherwise, what would be the point?
l34ndr4
28-04-2006 11:01:29
ok,
I have thi problem ,
how can I delete,erase,stop and Y axis force inmedietly, OK with opposing forces but how?
nathanwilliams6
28-04-2006 11:02:01
although you shouldnt really do it, you could use
Ogre::Vector3 noforce (0.0, 0.0, 0.0);
body->setVelocity(noforce );
body->setOmega(noforce );
that would kill all forces.
combined with
body->getVelocity()
and ->getOmega();
you can work out which part of the current volcity to remove
CaseyB
28-04-2006 17:06:29
you should be able to do something like// Get current velocity
Ogre::Vector3 oppositeForce = body->getVeolcity();
// Reverse it
oppositeForce = Ogre::Vector3::ZERO - oppositeForce;
// Apply it
body->addForce(oppositeForce);
batonrye
28-04-2006 20:47:07
Is it just gravity that you want to turn off?
If that is the case, just change the callbacks to include/exclude the downward gravity force for the objects you wish to turn the gravity on/off for...