Filter NaN and Infinity values at SOP AngularVelocity setter
parent
f62008f728
commit
2700b096bc
|
@ -959,7 +959,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
m_angularVelocity = value;
|
if (float.IsNaN(value.X) || float.IsNaN(value.Y) || float.IsNaN(value.Z)
|
||||||
|
|| float.IsInfinity(value.X) || float.IsInfinity(value.Y) || float.IsInfinity(value.Z))
|
||||||
|
m_angularVelocity = Vector3.Zero;
|
||||||
|
else
|
||||||
|
m_angularVelocity = value;
|
||||||
|
|
||||||
PhysicsActor actor = PhysActor;
|
PhysicsActor actor = PhysActor;
|
||||||
if ((actor != null) && actor.IsPhysical)
|
if ((actor != null) && actor.IsPhysical)
|
||||||
actor.RotationalVelocity = m_angularVelocity;
|
actor.RotationalVelocity = m_angularVelocity;
|
||||||
|
|
Loading…
Reference in New Issue