From 3041747bcd3ed0be8b9cd8104973d37486c515ad Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 17 Nov 2007 03:48:13 +0000 Subject: * ODEPlugin - fixed issue where resizing prim causes the prim's collision box to no longer be matching the client's view of where it should be. --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 5422c11..a2d8cfd 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -1501,8 +1501,8 @@ namespace OpenSim.Region.Physics.OdePlugin // This is a fallback.. May no longer be necessary. if (Body == (IntPtr)0) enableBody(); - // Prim auto disable after 20 frames, - // if you move it, re-enable the prim manually. + //Prim auto disable after 20 frames, + ///if you move it, re-enable the prim manually. d.BodyEnable(Body); d.BodySetPosition(Body, _position.X, _position.Y, _position.Z); } @@ -1559,9 +1559,25 @@ namespace OpenSim.Region.Physics.OdePlugin else { prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z); + d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); + d.Quaternion myrot = new d.Quaternion(); + myrot.W = _orientation.w; + myrot.X = _orientation.x; + myrot.Y = _orientation.y; + myrot.Z = _orientation.z; + d.GeomSetQuaternion(prim_geom, ref myrot); + + } } else { prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z); + d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); + d.Quaternion myrot = new d.Quaternion(); + myrot.W = _orientation.w; + myrot.X = _orientation.x; + myrot.Y = _orientation.y; + myrot.Z = _orientation.z; + d.GeomSetQuaternion(prim_geom, ref myrot); //d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z); -- cgit v1.1