Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork

avinationmerge
ubit 2013-01-06 13:08:48 +01:00
commit aa44a65d24
1 changed files with 11 additions and 10 deletions

View File

@ -78,8 +78,12 @@ namespace OpenSim.Region.Physics.OdePlugin
IntPtr geom = ((OdePrim)actor).prim_geom; IntPtr geom = ((OdePrim)actor).prim_geom;
Vector3 geopos = d.GeomGetPositionOMV(geom); // Vector3 geopos = d.GeomGetPositionOMV(geom);
Quaternion geomOri = d.GeomGetQuaternionOMV(geom); // Quaternion geomOri = d.GeomGetQuaternionOMV(geom);
Vector3 geopos = actor.Position;
Quaternion geomOri = actor.Orientation;
Quaternion geomInvOri = Quaternion.Conjugate(geomOri); Quaternion geomInvOri = Quaternion.Conjugate(geomOri);
Quaternion ori = Quaternion.Identity; Quaternion ori = Quaternion.Identity;
@ -116,6 +120,7 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
int status = 1; int status = 1;
offset = rayResults[0].Pos - geopos; offset = rayResults[0].Pos - geopos;
d.GeomClassID geoclass = d.GeomGetClass(geom); d.GeomClassID geoclass = d.GeomGetClass(geom);
@ -191,13 +196,12 @@ namespace OpenSim.Region.Physics.OdePlugin
if (norm.Z < 0.5f) if (norm.Z < 0.5f)
{ {
float rayDist = 4.0f; float rayDist = 4.0f;
float curEdgeDist = 0.0f;
for (int i = 0; i < 6; i++) for (int i = 0; i < 6; i++)
{ {
pivot.X -= 0.005f * norm.X; pivot.X -= 0.01f * norm.X;
pivot.Y -= 0.005f * norm.Y; pivot.Y -= 0.01f * norm.Y;
pivot.Z -= 0.005f * norm.Z; pivot.Z -= 0.01f * norm.Z;
rayDir.X = -norm.X * norm.Z; rayDir.X = -norm.X * norm.Z;
rayDir.Y = -norm.Y * norm.Z; rayDir.Y = -norm.Y * norm.Z;
@ -208,8 +212,6 @@ namespace OpenSim.Region.Physics.OdePlugin
if (rayResults.Count == 0) if (rayResults.Count == 0)
break; break;
curEdgeDist += rayResults[0].Depth;
if (Math.Abs(rayResults[0].Normal.Z) < 0.7f) if (Math.Abs(rayResults[0].Normal.Z) < 0.7f)
{ {
rayDist -= rayResults[0].Depth; rayDist -= rayResults[0].Depth;
@ -226,7 +228,6 @@ namespace OpenSim.Region.Physics.OdePlugin
else else
{ {
foundEdge = true; foundEdge = true;
edgeDist = curEdgeDist;
edgePos = rayResults[0].Pos; edgePos = rayResults[0].Pos;
break; break;
} }
@ -254,7 +255,7 @@ namespace OpenSim.Region.Physics.OdePlugin
for (int i = 0; i < 3; i++) for (int i = 0; i < 3; i++)
{ {
pivot.Z -= 0.005f; pivot.Z -= 0.01f;
rayDir.X = toCamX; rayDir.X = toCamX;
rayDir.Y = toCamY; rayDir.Y = toCamY;
rayDir.Z = (-toCamX * norm.X - toCamY * norm.Y) / norm.Z; rayDir.Z = (-toCamX * norm.X - toCamY * norm.Y) / norm.Z;