A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by blackbird_dream » Fri Oct 27, 2017 10:03 am
Hello
Does the function Newtonbodygetmatrix still exist ?
How to call it in a Unity c# script ?
I need to know the orientation Matrix of a body to calculate the orientation of a vector (given in the local frame ) in the global frame.
In the past I used in Delphi :
- Code: Select all
newtonbodygetmatrix(RigidBody,@M[0,0]);
Invertmatrix(M);
Ray_origin_loc:=affinevectormake(VectorTransform(Vector_in_local_Frame,M));
For instance If I want to express in the global frame the coordinates of a vector (1,0,0) given in the local frame of the NewtonBody how could I do that?
Thks
-
blackbird_dream
-
- Posts: 354
- Joined: Wed Jun 07, 2006 3:08 pm
- Location: France
by blackbird_dream » Mon Nov 06, 2017 9:12 am
I used
- Code: Select all
transform.TransformDirection
instead which gives the global coordinates of a vector expressed in the local system of the body.
-
blackbird_dream
-
- Posts: 354
- Joined: Wed Jun 07, 2006 3:08 pm
- Location: France
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 15 guests