diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index af7121d8c1..6e56f603cb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -959,7 +959,12 @@ namespace OpenSim.Region.Framework.Scenes } 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; if ((actor != null) && actor.IsPhysical) actor.RotationalVelocity = m_angularVelocity;