vehicle with physics wheel

Post Reply
gdlk
Posts: 62
Joined: Fri Oct 24, 2014 7:01 pm

vehicle with physics wheel

Post 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!!
gdlk
Posts: 62
Joined: Fri Oct 24, 2014 7:01 pm

Re: vehicle with physics wheel

Post 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!!
horvatha4
Posts: 14
Joined: Sun Jun 16, 2013 3:52 pm

Re: vehicle with physics wheel

Post 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!
gdlk
Posts: 62
Joined: Fri Oct 24, 2014 7:01 pm

Re: vehicle with physics wheel

Post by gdlk »

Thanks! =D

Any shape do you recommend to the wheels?
horvatha4
Posts: 14
Joined: Sun Jun 16, 2013 3:52 pm

Re: vehicle with physics wheel

Post 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!
gdlk
Posts: 62
Joined: Fri Oct 24, 2014 7:01 pm

Re: vehicle with physics wheel

Post 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)
Post Reply