Strange Wheelset, NxOgre.1.0.22T5, help !!

zhucde

11-08-2010 11:23:03

I use NxOgre.1.0.22T5, i setup a car like this:



NxOgre::WheelParams wheelP;
wheelP.setToDefault();
wheelP.mMass = 13250.0f;
wheelP.mLocalPose.t.set(0,0,0 );
wheelP.mDensity = 400.0f;
wheelP.mSuspension.spring = 27150.0f;
wheelP.mSuspension.damper = 2500;
wheelP.mSuspension.targetValue = 0.0f;
wheelP.mSuspensionTravel = 0.35f;

Real radius=mWheelRadius;
float3 forward_left=float3(0.756, -0.55, 1.619);
float3 backward_right=float3(-0.756, -0.55, -0.776);


mSet = WheelSet::createFourWheelSet(radius, forward_left, backward_right, mactor, wheelP, "model:"+mLeftWheelMeshName,"model: "+mRightWheelMeshName);

mSet->setAs(WheelSet::TL_Front);
mSet->registerMachine(mPhxScene);


mactor->setSleepEnergyThreshold(0.0);
mactor->wakeUp(1e10);



every thing is ok

[attachment=2]car1.jpg[/attachment]


but when i detroy this car (use following code):

if(mactor)
delete mactor;


then , i setup another car(in fact , any new car), a trange problem happen, no wheel under the car body:
[attachment=1]car2.jpg[/attachment]

in physx world , it is ok:
[attachment=0]car3.jpg[/attachment]

i saw all renderable wheels are created, but they are all at the origin point, what happened? how to do ?

zhucde

12-08-2010 11:34:06

Solved. Machine ID problem