A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by Carli » Fri Nov 20, 2009 9:06 am
Hi.
I'm writing a character controler and don't know how to determine the rotation to only the Y-Axis.
i used the search-function but none of them fitted to my issue.
-
Carli
-
- Posts: 245
- Joined: Fri Oct 02, 2009 5:28 am
by Julio Jerez » Fri Nov 20, 2009 9:35 am
you need to use an upvector joint,
-
Julio Jerez
- Moderator

-
- Posts: 12452
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by JernejL » Fri Nov 20, 2009 9:53 am
It is unclear what exactly you want (limit angles or get angles) so this will explain both:
Like Julio said, using NewtonConstraintCreateUpVector you can limit rotation to just 1 axis.
Using a newton function NewtonGetEulerAngle you can extract euler angles (in radians) from a matrix, using that you can find out the "heading" / Y rotation of the body.
-

JernejL
-
- Posts: 1587
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
by Carli » Fri Nov 20, 2009 11:48 am
thank you.
In the end, i will need both.
-
Carli
-
- Posts: 245
- Joined: Fri Oct 02, 2009 5:28 am
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 442 guests