forked from bartvdbraak/blender
Bugfix for [#18911] Applied torque breaks rigid bodies in game engine
This commit is contained in:
parent
bf729ab268
commit
db8b4cee56
@ -1015,6 +1015,12 @@ void CcdPhysicsController::ApplyTorque(float torqueX,float torqueY,float torque
|
||||
torque = xform.getBasis()*torque;
|
||||
}
|
||||
if (body)
|
||||
{
|
||||
if (m_cci.m_bRigid)
|
||||
{
|
||||
body->applyTorque(torque);
|
||||
}
|
||||
else
|
||||
{
|
||||
//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
|
||||
@ -1026,6 +1032,7 @@ void CcdPhysicsController::ApplyTorque(float torqueX,float torqueY,float torque
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CcdPhysicsController::ApplyForce(float forceX,float forceY,float forceZ,bool local)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user