A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by JoshKlint » Fri Mar 08, 2019 10:11 pm
Without going into detail, NewtonBodyAddTorque() appears to be acting in a very strange and unpredictable way, adding torque in different directions. Has anything changed here that would cause such behavior?
-
JoshKlint
-
- Posts: 163
- Joined: Sun Dec 10, 2017 8:03 pm
-
by Dave Gravel » Fri Mar 08, 2019 10:20 pm
It can behave strange if you use it outside newton callback, You can use it with applytorqueandforce callback.
If i'm not wrong it is ok to use it in a listener PreUpdate PostUpdate too, And maybe in some special cases inside SubmitConstraints joint.
Edited:
It can depend about if you apply the value in global or in local space too.
-
Dave Gravel
-
- Posts: 800
- Joined: Sat Apr 01, 2006 9:31 pm
- Location: Quebec in Canada.
-
by JoshKlint » Fri Mar 08, 2019 10:46 pm
I am using it in the callback, in global space. Everything worked fine before and now it does not work since I updated Newton a while ago.
-
JoshKlint
-
- Posts: 163
- Joined: Sun Dec 10, 2017 8:03 pm
-
by Julio Jerez » Fri Mar 08, 2019 11:11 pm
That's not possible, you most be calculating an incorrect torque value.
I just fixed the buoyancy demo, that add a force and a torque to a bunch of bodies inside a trigger volume to emulate a swimming pool.
There are many bodies and each one gets a different torque and forced based on the fraction of the collision volume that is under water.
If the torque was wrong, it will show there.
Look at that demo, is very simple and show how to use listener to add system effects to bodies.
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Julio Jerez » Sat Mar 09, 2019 2:57 pm
Dave say he is seeing some weird bugs as well, It not with torque, but is definititlly something extrange. I am looking at it
-
Julio Jerez
- Moderator
-
- Posts: 12249
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by JoshKlint » Sat Mar 09, 2019 10:37 pm
I found the cause, this was my mistake.
-
JoshKlint
-
- Posts: 163
- Joined: Sun Dec 10, 2017 8:03 pm
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 20 guests