A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by Aphex » Tue Sep 02, 2008 5:12 pm
Hi all,
Has anyone here created a multibody vehicle joint with the chassis body *not* having the identity matrix?
When I do this, the wheels seem to disregard the parent body matrix and always align to the identity (i.e. 'heading' zero).
-
Aphex
-
- Posts: 144
- Joined: Fri Jun 18, 2004 6:08 am
- Location: UK
-
by JernejL » Tue Sep 02, 2008 6:06 pm
you need to set the wheel pin direction.
-
JernejL
-
- Posts: 1578
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
by Aphex » Wed Sep 03, 2008 3:30 am
Do you know where I can set this? The CustomMultiBodyVehicleAddTire method just takes a local position... I was presuming it used a crossProd of the vehicle body up & fwds vectors supplied in CreateCustomMultiBodyVehicle.
-
Aphex
-
- Posts: 144
- Joined: Fri Jun 18, 2004 6:08 am
- Location: UK
-
by Dave Gravel » Wed Sep 03, 2008 2:38 pm
Here.
// Multi rigid BodyCar controller functions
JOINTLIBRARY_API CustomJoint *CreateCustomMultiBodyVehicle (const dFloat* frontDir, const dFloat* upDir, const NewtonBody* carBody);
frontDir, upDir change the pin.
If you use a mesh to create the vehicle body, it depending from the default mesh axis too.
You can need to change it in a modeler or from your mesh loader.
i'm not sure that is what you need to know but maybe it can help you.
Good luck.
-
Dave Gravel
-
- Posts: 800
- Joined: Sat Apr 01, 2006 9:31 pm
- Location: Quebec in Canada.
-
by Aphex » Wed Sep 03, 2008 3:29 pm
Ahhh - after looking more closely at the jointlib code I can see: the up & fwd vectors supplied to CreateCustomMultiBodyVehicle should be in world space
.
Cheers for the replies!
-
Aphex
-
- Posts: 144
- Joined: Fri Jun 18, 2004 6:08 am
- Location: UK
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 37 guests