Fix invalid rigidbody center of mass location
This commit is contained in:
@@ -276,8 +276,7 @@ void RigidBody::UpdateMass()
|
|||||||
float raiseMassToPower = 0.75f;
|
float raiseMassToPower = 0.75f;
|
||||||
// TODO: link physical material or expose density parameter
|
// TODO: link physical material or expose density parameter
|
||||||
|
|
||||||
PxVec3 centerOfMassOffset = C2P(_centerOfMassOffset);
|
PxRigidBodyExt::updateMassAndInertia(*_actor, densityKGPerCubicUU);
|
||||||
PxRigidBodyExt::updateMassAndInertia(*_actor, densityKGPerCubicUU, ¢erOfMassOffset);
|
|
||||||
|
|
||||||
// Grab old mass so we can apply new mass while maintaining inertia tensor
|
// Grab old mass so we can apply new mass while maintaining inertia tensor
|
||||||
const float oldMass = _actor->getMass();
|
const float oldMass = _actor->getMass();
|
||||||
|
|||||||
Reference in New Issue
Block a user