Problems with Vehicle - Tyres slipping with more torque?

batnom

09-09-2008 05:53:00

Hi all,

I have a vehicle driving around and have implemented gears in hope to allow it to go faster.

With each gear (switch case) the torque is set but in the higher gears the tyres are slipping. I've tried setting the friction higher but it doesn't seem to help.

What variables should I be changing or functions should I be running?

Any help would be greatly appreciated.

batnom

13-09-2008 07:51:09

anyone? :(

BardockSSJ

13-09-2008 11:39:02

Try Using "Raycast car" - it solve most problems ;)

batnom

16-09-2008 07:00:50

I can't really find much on it and no working examples.. I already have base code with everything working except the car's speed due to the torque and wheels slipping.

I've changed the friction and it still speeds up a bit but still seems to slip.. >_>

terrykim426

27-10-2008 17:13:23

Hi, i have a similar problem.

No matter how high i set the torque, it still maintaining at the same speed. Can anyone guide us on which variables we should change?

Thx in advance

batnom

28-10-2008 04:33:52

Hi, i have a similar problem.

No matter how high i set the torque, it still maintaining at the same speed. Can anyone guide us on which variables we should change?

Thx in advance


I found a material pair helps

mPair = new OgreNewt::MaterialPair(m_World, defMat, mCar->vehMat);
mPair->setDefaultFriction(5.0f, 5.0f);
mPair->setDefaultElasticity(0.0f);


then in simple vehicle usercallback ()

tire->setMaxSideSlipSpeed( speed * 0.1f );
tire->setSideSlipCoefficient( speed / 200.0);

speed = tire->getLongitudinalSpeed();

tire->setMaxLongitudinalSlipSpeed( speed * 1.0);
tire->setLongitudinalSlipCoefficient( speed / 10.0);


hope it helps.

terrykim426

28-10-2008 10:14:21

Hi batnom,

Thx for the help. I'm still very new to both Ogrenewt and Newton.
But i not sure what are the defMat and vehMat should be and where they should be define. I tried setting usercallback() with ur code, but the speed is still the same.

batnom

28-10-2008 14:02:18

in OgreNewtonApplication constructor

// materials
defMat = new OgreNewt::MaterialID(m_World);


when creating the collision body in create scene

bod2->setMaterialGroupID(defMat);

in simplevehicle constructor

// materials
vehMat = new OgreNewt::MaterialID(mWorld);


in simplevehicle setup

// apply a mat - materials
m_chassis->setMaterialGroupID(vehMat);


i think that should do it.

terrykim426

28-10-2008 17:38:13

Thanks again.

I tried it. Its affecting the speed very little, but i guess its a start.
I will play around with the value. Really thanks alot ^^

micken

28-10-2008 21:53:52

You might also try:
- Wider wheels
- Longer wheels (more surface touching the ground)
- Using more complicated calculation (like adding an impulse to the wheel to make it gain torque or even just adding a force to the vehicle and bypass the wheels altogether, they will just roll along as the vehicle is pushed)

njw1985

03-11-2008 15:27:47

add one line for every frame: m_chassis->setOmega(Vector3(0,0,0));

So the problem is solved!!!