forked from bartvdbraak/blender
fix so that torque can be applied to DYNAMIC game objects, this fixes the skategirl.
Note that skategirl needs a bit higher angular damping, perhaps the conversion formula needs to be tweaked better?
This commit is contained in:
parent
e4abebfa91
commit
2d78dcfb61
@ -964,7 +964,14 @@ void CcdPhysicsController::ApplyTorque(float torqueX,float torqueY,float torque
|
||||
torque = xform.getBasis()*torque;
|
||||
}
|
||||
if (body)
|
||||
{
|
||||
//workaround for incompatibility between 'DYNAMIC' game object, and angular factor
|
||||
//a DYNAMIC object has some inconsistency: it has no angular effect due to collisions, but still has torque
|
||||
const btVector3& angFac = body->getAngularFactor();
|
||||
body->setAngularFactor(1.f);
|
||||
body->applyTorque(torque);
|
||||
body->setAngularFactor(angFac);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user