Newton 2 - MultiBodyVehicle - tyre problem

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Newton 2 - MultiBodyVehicle - tyre problem

Postby 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

Re: Newton 2 - MultiBodyVehicle - tyre problem

Postby JernejL » Tue Sep 02, 2008 6:06 pm

you need to set the wheel pin direction.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Newton 2 - MultiBodyVehicle - tyre problem

Postby 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

Re: Newton 2 - MultiBodyVehicle - tyre problem

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

Re: Newton 2 - MultiBodyVehicle - tyre problem

Postby 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 :roll: .

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 11 guests