NewtonBodyAddTorque Error?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

NewtonBodyAddTorque Error?

Postby 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: 47
Joined: Sun Dec 10, 2017 8:03 pm

Re: NewtonBodyAddTorque Error?

Postby 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.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://www.facebook.com/dave.gravel1
http://orionx3d.googlepages.com/
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 667
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: NewtonBodyAddTorque Error?

Postby 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: 47
Joined: Sun Dec 10, 2017 8:03 pm

Re: NewtonBodyAddTorque Error?

Postby 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
Moderator
 
Posts: 10715
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonBodyAddTorque Error?

Postby 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
Moderator
 
Posts: 10715
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonBodyAddTorque Error?

Postby JoshKlint » Sat Mar 09, 2019 10:37 pm

I found the cause, this was my mistake.
JoshKlint
 
Posts: 47
Joined: Sun Dec 10, 2017 8:03 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 4 guests