|
Post by PiratSS2 on Aug 18, 2004 21:47:29 GMT 1
Sometimes when I reset my entities, i notice that they can jump out of their original position. Like all of the suddent they got random force.
I dont know if anyone else had this problem and can help me.
|
|
|
Post by Kjelle69 on Aug 19, 2004 4:48:32 GMT 1
you mean when you reset the position of a body, it still has a velocity? let's say you reset the position of a body like this: NDB_BuildMatrix 0.0, 0.0, 0.0, 0.0, 10.0, 0.0 NDB_NewtonBodySetMatrix TheBody
if the body had a velocity before you reset the position, it still has that velocity! so you need to do this: NDB_SetVector 0.0, 0.0, 0.0 NDB_NewtonBodySetVelocity TheBody NDB_NewtonBodySetOmega TheBody
that should do it.
|
|