BulletSim: fix exceptions caused by setting physical properties before the prim body is initialized.
parent
ebb63b55aa
commit
b545e13184
|
@ -587,6 +587,7 @@ public sealed class BSPrim : BSPhysObject
|
|||
base.SetMaterial(material);
|
||||
PhysicsScene.TaintedObject("BSPrim.SetMaterial", delegate()
|
||||
{
|
||||
if (PhysBody.HasPhysicalBody)
|
||||
UpdatePhysicalParameters();
|
||||
});
|
||||
}
|
||||
|
@ -600,6 +601,7 @@ public sealed class BSPrim : BSPhysObject
|
|||
base.Friction = value;
|
||||
PhysicsScene.TaintedObject("BSPrim.setFriction", delegate()
|
||||
{
|
||||
if (PhysBody.HasPhysicalBody)
|
||||
UpdatePhysicalParameters();
|
||||
});
|
||||
}
|
||||
|
@ -615,6 +617,7 @@ public sealed class BSPrim : BSPhysObject
|
|||
base.Restitution = value;
|
||||
PhysicsScene.TaintedObject("BSPrim.setRestitution", delegate()
|
||||
{
|
||||
if (PhysBody.HasPhysicalBody)
|
||||
UpdatePhysicalParameters();
|
||||
});
|
||||
}
|
||||
|
@ -630,6 +633,7 @@ public sealed class BSPrim : BSPhysObject
|
|||
base.Density = value;
|
||||
PhysicsScene.TaintedObject("BSPrim.setDensity", delegate()
|
||||
{
|
||||
if (PhysBody.HasPhysicalBody)
|
||||
UpdatePhysicalParameters();
|
||||
});
|
||||
}
|
||||
|
@ -645,6 +649,7 @@ public sealed class BSPrim : BSPhysObject
|
|||
base.GravityModifier = value;
|
||||
PhysicsScene.TaintedObject("BSPrim.setGravityModifier", delegate()
|
||||
{
|
||||
if (PhysBody.HasPhysicalBody)
|
||||
UpdatePhysicalParameters();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue