Raycast vehicle and wall collision

wtherapy
Posts: 5
Joined: Thu Jun 14, 2012 2:15 pm

Raycast vehicle and wall collision

Post by wtherapy »

Hello,

I am using btRaycastVehicle for a vehicle simulation and have collision with walls. How can I customize the collision with the walls so my vehicle won't top over when colliding at high speeds ?
dumbo2007
Posts: 66
Joined: Sun Jan 30, 2011 8:46 pm

Re: Raycast vehicle and wall collision

Post by dumbo2007 »

Perhaps you can check if the chassis y-axis is pointing downwards and set it back upright ?
Domi
Posts: 4
Joined: Fri Apr 06, 2012 2:10 am

Re: Raycast vehicle and wall collision

Post by Domi »

To make things look smoother you might want to change the collider or manually change the center of mass to the back of the chassis, or move it around dynamically, or apply some force or angular velocity proportional to the angle (linearly, squared or cubed or w/e) between up axis of the vehicle and the world up axis, that will counter-act the rotation.
wtherapy
Posts: 5
Joined: Thu Jun 14, 2012 2:15 pm

Re: Raycast vehicle and wall collision

Post by wtherapy »

hello,

thanks for the answer, how do I change the collider?...