BulletSim: remove collision cache clearing logic for physical objects.
This fixes constraints from getting messed up when properties change.0.7.6-extended
parent
1217785155
commit
10152815ac
|
@ -302,13 +302,16 @@ public abstract class BSPhysObject : PhysicsActor
|
||||||
{
|
{
|
||||||
if (PhysBody.HasPhysicalBody)
|
if (PhysBody.HasPhysicalBody)
|
||||||
{
|
{
|
||||||
// Clear the collision cache since we've changed some properties.
|
|
||||||
PhysScene.PE.ClearCollisionProxyCache(PhysScene.World, PhysBody);
|
|
||||||
if (IsPhysical)
|
if (IsPhysical)
|
||||||
{
|
{
|
||||||
// Physical objects might need activating
|
// Physical objects might need activating
|
||||||
PhysScene.PE.Activate(PhysBody, forceIt);
|
PhysScene.PE.Activate(PhysBody, forceIt);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Clear the collision cache since we've changed some properties.
|
||||||
|
PhysScene.PE.ClearCollisionProxyCache(PhysScene.World, PhysBody);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue