Booking for betajean's Vehicle Service

frier

27-08-2007 12:15:50

Ok, I've been working on this Vehicle thing on and off and found myself reading more then implementing. ANYWAYS.

Ill start with a simple one that i'm angry i cant do:

i want my car to tilt backwards slowly when they go off jumps.

1)
I have this currently because it goes spastic on the X and Z axis if i dont.
mBody->raiseBodyFlag(NX_BF_FROZEN_ROT_Z);
mBody->raiseBodyFlag(NX_BF_FROZEN_ROT_X);


How do i make it more resistant on the i guess Z axis?(i think the DEFAULT car mesh faces down the Z, im thinking, setAngularDamping )

I guess just setting up an animation would be enough.

2)
I need to tighten suspension so the body doesnt bounce when i land, i read through Ageia tutorials and pretty much get the gist on how it works. But dont know how to use NxOgre with suspension.

like this?
bugWheels.frontLeft->setSuspensionTravel(0.2f)
bugWheels.frontRight->setSuspensionTravel(0.2f)



3)
I also would like to see what happens if the wheels on my car are all spinning and all steering. Should i just change/overload the createFourWheelSet function so they all "w.Drive" and all "w.Steering"?

P.S
Is this a mistype?

void Actor::setAngularDamping(NxReal r) {
mActor->setLinearDamping(r); <- Mistype? setAngularDamping()?
}

//////////////////////////////////////////////////////////

NxReal Actor::getAngularDamping() const {
return mActor->getAngularDamping();
}


How much will this all cost me? :shock:

betajaen

27-08-2007 12:31:55

1. You could turn up the damping and limit the X,Z whilst the car is jumping.

2. Pretty much. I'm not the expert with the Wheels around here. But the WheelSystem is wrapped and uses the same language as Ageia does. So if you want to adjust the suspension travel that's how you do it.

3. You could just make your own class/struct with four wheel classes and do it that way. The WheelSet is just a helper/example, it isn't the only way to do vehicles in Nxogre.

3a. Yep, and I've changed it. Thanks for noticing.


It cost you £1702. I'll mail you the bill.

frier

27-08-2007 14:02:12

1) ok ill set dampening when they are in mid air(when not colliding with anything i guess)

2 and 3) Im looking at this is that i might have to inherit the WheelSet class like so. And do as i may with it.

class BugWheels : public WheelSet

3a) sweet.

Its go time.