BulletSim: remove collision cache clearing logic for physical objects.
This fixes constraints from getting messed up when properties change.varregion
parent
b29e9d37e7
commit
dacc20ee48
|
@ -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