天天看點

遊戲開發實體引擎PhysX研究系列:将重力模拟關閉

參考:

        Rigid Body Dynamics — NVIDIA PhysX SDK 4.1 Documentation

說明:

        PxActor::setActorFlag(PxActorFlag::eDISABLE_GRAVITY, true);

        或着将重力設定為0

        在SampleSubmarine示例中可以看到,為了模拟飛船的運動效果,預先關閉了它的重力模拟

//disable the current and buoyancy effect for the sub.
	mSubmarineActor->setActorFlag(PxActorFlag::eDISABLE_GRAVITY, true);