Page 1 of 1

vehicle with physics wheel

Posted: Tue Nov 03, 2015 4:00 pm
by gdlk
Hi!

I want to implement a vehicle with physics wheels (instead of raycast, I believe it could get a better physics behaviour). About that, I had the dude about if I must compute the car equations anyway (turning forces for example) or if using physics wheels already consider it. If I still must compute the equations, I must cancel the solution given by the solver in the wheels/chassis and then apply my computed forces?

Thanks!!

Re: vehicle with physics wheel

Posted: Wed Nov 11, 2015 10:52 pm
by gdlk
Any tip?

I implement the wheels like cylinders and join to the chassis with 6dofSpring2 constraint (the axis around wheel rotate is free, the constraints has 200 iterations). To move, a torque is applied over the wheels. However, the vehicle don't move in a straight line (go almost forward, but it deviate a little to the left or the right); if a high torque is applied, the vehicle start to spin. Any tip?

Thanks!!

Re: vehicle with physics wheel

Posted: Sat Nov 14, 2015 6:59 am
by horvatha4
Hi!
I don't recommend to use cylinders as a vehicle wheel.
I made a lot of tests with it. Over ca. 10 km/h the wheels start jumping and popping on the road ( the road was a btTriangleMesh ).
For axis driving I recommend the btRotationalLimitMotor.
Good Luck!

Re: vehicle with physics wheel

Posted: Sat Nov 14, 2015 11:22 am
by gdlk
Thanks! =D

Any shape do you recommend to the wheels?

Re: vehicle with physics wheel

Posted: Sat Nov 14, 2015 1:51 pm
by horvatha4
No, sorry. I don't have any other idea.
I tried btCylinderShapeZ and btConvexHullShape for train-axis.
It give a fantastic good simulation below 10 km/h, but on higher speed the axis start popping on the rail and the train jump down from the track.
With the setDamping function I can raise the "critikal-speed" up ca. 30 km/h.
Because trainaxes are rarely jumping, I give up the "rigid body axis" building and turn back to btRaycastVehicle.

p.s.
If your cars running on a perfect flat plan ( btPlane ), maybe that works, but I don't tested that!

Re: vehicle with physics wheel

Posted: Mon Nov 16, 2015 8:50 pm
by gdlk
with btPlane had the problem too

Anyways thanks!! (now I know is not only my implementation the problem =P, I will go back to raycast)