Report any bugs here and we'll post fixes
Moderators: Sascha Willems, Thomas
by Lax » Mon Dec 17, 2018 4:19 pm
Hi,
is it somehow possible to reset all forces at once?
I'm writing a level editor, in which the user can press play/stop. When pressing play, the physics is updated. Now I encounter issues, between stop/play/stop/play again the simulation, as the bodies have forces applied. I set all forces to 0 and also called: 'NewtonInvalidateCache' etc. but nothing does work.
As soon as I press play (updating newton), the bodies are move a bit in the scene.
Best Regards
Lax
-
Lax
-
- Posts: 165
- Joined: Sat Jan 08, 2011 8:24 am
by JernejL » Tue Dec 18, 2018 2:25 am
I think besides invalidating cache, you need to set velocity, omega and torque to zeroes ( NewtonBodySetTorque, NewtonBodySetOmega, NewtonBodySetForce ) on all bodies.
-
JernejL
-
- Posts: 1578
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
Return to Bugs and Fixes
Who is online
Users browsing this forum: No registered users and 9 guests