Correct a coordinate to make the viewer like it

avinationmerge
Melanie 2012-01-24 01:17:41 +00:00
parent 8fcb9bf418
commit 090bf7acca
2 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ namespace OpenSim.Framework
Pitch = (float)-Math.Atan2(dir.Z, Math.Sqrt(dir.X * dir.X + dir.Y * dir.Y)); Pitch = (float)-Math.Atan2(dir.Z, Math.Sqrt(dir.X * dir.X + dir.Y * dir.Y));
} }
public Vector3 GetLocation(Vector3 pos, Quaternion rot) public Vector3 GetLocation(Quaternion rot)
{ {
Quaternion y = Quaternion.CreateFromEulers(0, 0, Yaw); Quaternion y = Quaternion.CreateFromEulers(0, 0, Yaw);
Quaternion p = Quaternion.CreateFromEulers(0, Pitch, 0); Quaternion p = Quaternion.CreateFromEulers(0, Pitch, 0);
@ -69,7 +69,7 @@ namespace OpenSim.Framework
rot.W = -rot.W; rot.W = -rot.W;
offset *= rot; offset *= rot;
return pos + offset; return offset;
} }
} }

View File

@ -1358,7 +1358,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
foreach (SpawnPoint sp in settings.SpawnPoints()) foreach (SpawnPoint sp in settings.SpawnPoints())
{ {
spawnPoints.Add(sp.GetLocation(telehub.AbsolutePosition, telehub.GroupRotation)); spawnPoints.Add(sp.GetLocation(telehub.GroupRotation));
} }
client.SendTelehubInfo(settings.TelehubObject, client.SendTelehubInfo(settings.TelehubObject,