Vehicles are "Bouncy Bouncy"

danharibo

01-03-2008 22:32:04

It seems all of my vehicles like to bounce, this means i can't actually drive them because they're bouncing all the time :x
void CVehicle::addWheel(Simufarm::WheelParams& params)
{
NxOgre::WheelParams wp;
wp.setToDefault();
wp.setToNormal();
wp.mass = 50;
wp.suspension_damper = 50;
//wp.suspension_spring = 50;

NxOgre::Wheel* mTempWheel = static_cast<NxOgre::Wheel*>(mPhysBody->addShape(new NxOgre::WheelShape(params.Radius,"Offset: "+Ogre::StringConverter::toString(params.Pos),wp)));

mTempWheel->addMesh(params.Model);

mWheelSet->mWheels.insert(mTempWheel);

//Setup Steering and Driving Wheels
if(params.Powered)
mWheelSet->Drive.insert(mTempWheel);

if(params.Steering)
mWheelSet->Steering.insert(mTempWheel);

}


And creation of PhysX:
void CGame::createPhysicsWorld()
{
mPhysWorld = new NxOgre::World("log: txt");
//PhysX Debugger
mPhysWorld->getPhysXDriver()->createDebuggerConnection();
mPhysScene = mPhysWorld->createScene("SufPhysScene",mSceneMgr,"gravity: yes");
mPhysScene->setGravity(Ogre::Vector3(0,-9,0));
}

NickM

02-03-2008 10:18:49

If the bouncing is due to the suspension, play around with the spring and/or damper rates until you find the figures that work for you.

danharibo

02-03-2008 11:30:38

If the bouncing is due to the suspension, play around with the spring and/or damper rates until you find the figures that work for you.I Still get the same behavior with the default settings :|

NickM

02-03-2008 20:14:25

The default suspension settings may not work well with the mass of your vehicle, have you tried changing them?

danharibo

02-03-2008 20:16:49

The default suspension settings may not work well with the mass of your vehicle, have you tried changing them?The mass is 100, and My friend has tried to play around with them with no luck

betajaen

02-03-2008 20:48:26

Mass is to low for one thing. 100 Kilograms probably weighs less than you.

NickM

02-03-2008 22:12:07

Currently in my game I'm using 1400 for the mass of my car, a spring rate of 15000 and a damper of 400.

danharibo

03-03-2008 09:21:44

Currently in my game I'm using 1400 for the mass of my car, a spring rate of 15000 and a damper of 400.It changes the way they bounce, but they still bounce :(
NxOgre::WheelParams wp;
wp.setToDefault();
wp.setToNormal();
//wp.mass = 50;
wp.suspension_damper = 400;
wp.suspension_spring = 15000;

I'm using 0.9 if it matters.

betajaen

03-03-2008 11:10:04

And the mass of the car is 1500-2500?

danharibo

03-03-2008 12:40:10

And the mass of the car is 1500-2500?1400 Yes

betajaen

03-03-2008 12:48:48

Then keep increasing the mass of the actor.

danharibo

03-03-2008 15:14:50

A Mass of 140000 did it

betajaen

03-03-2008 15:52:02

That's one really heavy vehicle of 154.3 tons you have there. I'm sure altering the suspension or springs will do it.

luis

03-03-2008 16:00:57

danharibo, try these values:
http://www.ogre3d.org/phpBB2addons/view ... ght=spring

BTW are you using the earth gravity ?

danharibo

03-03-2008 16:25:31

danharibo, try these values:
http://www.ogre3d.org/phpBB2addons/view ... ght=spring

BTW are you using the earth gravity ?

There about (-9)

Could this have something to do with the fact that the 1m cube is more like a 1/2foot cube? :?

luis

03-03-2008 16:27:50

wait! are you using density instead of mass ?

danharibo

03-03-2008 17:08:50

wait! are you using density instead of mass ?
No, I'm using "mass: 140000"