aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-10-10 00:57:33 +0100
committerUbitUmarov2012-10-10 00:57:33 +0100
commit8fa91686dbee7071d2a718886cdc11e6751ccbff (patch)
tree68b73d680c906183c6bd54412ce003df3a871a56 /OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
parentdebug (diff)
downloadopensim-SC-8fa91686dbee7071d2a718886cdc11e6751ccbff.zip
opensim-SC-8fa91686dbee7071d2a718886cdc11e6751ccbff.tar.gz
opensim-SC-8fa91686dbee7071d2a718886cdc11e6751ccbff.tar.bz2
opensim-SC-8fa91686dbee7071d2a718886cdc11e6751ccbff.tar.xz
add some quaternion normalizations to keep errors under control
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs3
1 files changed, 3 insertions, 0 deletions
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
646 if (value.Length() > 1.01f || qlen <0.99) 646 if (value.Length() > 1.01f || qlen <0.99)
647 m_log.WarnFormat("[PHYSICS]: Got nonnorm quaternion Orientation from Scene in Object {0} norm {1}", Name, qlen); 647 m_log.WarnFormat("[PHYSICS]: Got nonnorm quaternion Orientation from Scene in Object {0} norm {1}", Name, qlen);
648// 648//
649 value.Normalize();
650
649 AddChange(changes.Orientation, value); 651 AddChange(changes.Orientation, value);
650 } 652 }
651 else 653 else
@@ -2252,6 +2254,7 @@ namespace OpenSim.Region.Physics.OdePlugin
2252 if (qlen > 1.01f || qlen < 0.99) 2254 if (qlen > 1.01f || qlen < 0.99)
2253 m_log.WarnFormat("[PHYSICS]: Got nonnorm quaternion from geom in Object {0} norm {1}", Name, qlen); 2255 m_log.WarnFormat("[PHYSICS]: Got nonnorm quaternion from geom in Object {0} norm {1}", Name, qlen);
2254// 2256//
2257 _orientation.Normalize();
2255 2258
2256 d.Vector3 lpos = d.GeomGetPosition(prim_geom); 2259 d.Vector3 lpos = d.GeomGetPosition(prim_geom);
2257 _position.X = lpos.X; 2260 _position.X = lpos.X;