Newton 2.0 Vehicle's problem, may be a bug!

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Newton 2.0 Vehicle's problem, may be a bug!

Postby hcg_me » Mon Oct 13, 2008 6:19 am

I'm creating a Vehicle this way:

float front_dir[3] = {0,1,0};
float up_dir[3] = {0,0,1};
float FL_tirepos[3] = {0.827,-1.345,0.42};
float FR_tirepos[3] = {-0.827,-1.345,0.42};
float RL_tirepos[3] = {0.827,1.345,0.42};
float RR_tirepos[3] = {-0.827,-1.345,0.42};

vehiclejoint = CreateCustomMultiBodyVehicle(&front_dir, &up_dir, carBody);

This works without problems, the body falls down. But, if I try to add tires, the vehicle-tires are not in right position, vehicle-body have a 1.0 metre distance from the vehicle-tires, and I driver the car, the tire's state is right, can spin, but when I put the vehicle in the air, the vehicle-body disappears.

CustomMultiBodyVehicleAddTire( rvehiclejoint , this, &FL_tirepos[0], 35.0f, 0.4f, 0.3f,
0.4, 120.0f, 10.0f
....

I have tried a lot , found the "vehiclejoint = CreateCustomMultiBodyVehicle(&front_dir, &up_dir, truckbody)" line may be a bug. when I uses below the way, the vehicle-tires are right position and the vehicle can run, but can't drive.

float front_dir[3] = {0,0,-1};
float up_dir[3] = {0,1,0};
vehiclejoint = CreateCustomMultiBodyVehicle(&front_dir, &up_dir, truckbody);
hcg_me
 
Posts: 2
Joined: Wed Jul 12, 2006 1:55 am

Re: Newton 2.0 Vehicle's problem, may be a bug!

Postby Aphex » Tue Oct 14, 2008 8:38 am

Note that the up & forward vectors need to be in world space, not local.
Aphex
 
Posts: 144
Joined: Fri Jun 18, 2004 6:08 am
Location: UK

Re: Newton 2.0 Vehicle's problem, may be a bug!

Postby hcg_me » Tue Oct 14, 2008 9:29 pm

Thanks your answer! My scene's forward & up vectors in world space are "float front_dir[3] = {0,1,0} and float up_dir[3] = {0,0,1}" , In Newton 1.53 my vehicle is right, but in Newton 2.0 the vehicle's is wrong, I don't know why ?
hcg_me
 
Posts: 2
Joined: Wed Jul 12, 2006 1:55 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 17 guests

cron