zhucde
04-09-2009 16:35:39
[NxOgre.1.0.22T5]
I create a camera actor with gravity on, the scene gravity is Vector3(0,-9.8,0),
somtimes, i have to disable the camera actor's gravity, only this actor, only disable its gravity, i also can move, collision.
with BloodyMess1.54, i only add CamActor->addForce(-gravity) to balance out the scene gravity,
but in NxOgre.1.0.22T5, if i do this, the camera raise up slightly,
how to do ?
I create a camera actor with gravity on, the scene gravity is Vector3(0,-9.8,0),
NodeRenderableParams renderableParams;
renderableParams.setToDefault();
renderableParams.mIdentifier = "CameraActor";
renderableParams.mIdentifierUsage = NodeRenderableParams::IU_Create;
renderableParams.mMode = RenderableSource::RM_Interpolate;
ActorParams actorParams;
actorParams.setToDefault();
actorParams.mMass = 1;
actorParams.mDensity = 11.0f;
actorParams.mLinearDamping = 2.5f;
// actorParams.mAngularDamping = 10;
actorParams.mBodyFlags.mDisableGravity = false;
actorParams.mFreeze.FreezeRotation();
mCameraActor = mScene->createBody<Body>("CakeSmartCamera", new NxOgre::Sphere(1.25f), Vector3(0,15,22), renderableParams, actorParams);
somtimes, i have to disable the camera actor's gravity, only this actor, only disable its gravity, i also can move, collision.
with BloodyMess1.54, i only add CamActor->addForce(-gravity) to balance out the scene gravity,
but in NxOgre.1.0.22T5, if i do this, the camera raise up slightly,
how to do ?