From 8fa91686dbee7071d2a718886cdc11e6751ccbff Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 10 Oct 2012 00:57:33 +0100 Subject: add some quaternion normalizations to keep errors under control --- OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs index e086264..eaee950 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs @@ -646,6 +646,8 @@ namespace OpenSim.Region.Physics.OdePlugin if (value.Length() > 1.01f || qlen <0.99) m_log.WarnFormat("[PHYSICS]: Got nonnorm quaternion Orientation from Scene in Object {0} norm {1}", Name, qlen); // + value.Normalize(); + AddChange(changes.Orientation, value); } else @@ -2252,6 +2254,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (qlen > 1.01f || qlen < 0.99) m_log.WarnFormat("[PHYSICS]: Got nonnorm quaternion from geom in Object {0} norm {1}", Name, qlen); // + _orientation.Normalize(); d.Vector3 lpos = d.GeomGetPosition(prim_geom); _position.X = lpos.X; -- cgit v1.1