A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by mandy » Sun Feb 05, 2012 10:39 pm
Hi all,
I'm a decent coder, but I'm finding Newton difficult. I have setup a simple custom ball and socket joint and have it working like a simple hinge (only rotating on a single axis). What I want to do now is apply torque at the joint so the hinge will close. Is this something I should do in the submit constraints callback? Do I use NewtonBodyAddTorque?, or do I use NewtonUserJointSetRowAcceleration on an angular row?
Any help would be appreciated.
-
mandy
-
- Posts: 7
- Joined: Sun Feb 05, 2012 10:26 pm
by mandy » Mon Feb 06, 2012 12:15 am
Ok, I have the joint contracting by using addtorque within the submit constraints callback, I think I just need some maths help.
How do I calculate a torque vector based on the position of a body if I want to apply torque on an axis relative to the body?
-
mandy
-
- Posts: 7
- Joined: Sun Feb 05, 2012 10:26 pm
by mandy » Mon Feb 06, 2012 4:20 am
Ok, so I think I have figured out how to get the joint to contract using torques. Now I would like to know how to find the relative angle between each body of a joint on each axis. Can anyone help me out here?
-
mandy
-
- Posts: 7
- Joined: Sun Feb 05, 2012 10:26 pm
by Peperotta » Tue Feb 28, 2012 11:23 am
mandy wrote: Now I would like to know how to find the relative angle between each body of a joint on each axis.
Have you found that out?
-
Peperotta
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 0 guests