BulletSim: remove collision cache clearing logic for physical objects.

This fixes constraints from getting messed up when properties change.
varregion
Robert Adams 2013-09-11 16:48:15 -07:00
parent b29e9d37e7
commit dacc20ee48
1 changed files with 5 additions and 2 deletions

View File

@ -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);
}
} }
} }