aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJeff Ames2007-11-19 05:28:00 +0000
committerJeff Ames2007-11-19 05:28:00 +0000
commita1391d08481cae567bd6805ee073208a91ca14d3 (patch)
tree33203cdace0f61ced5bc0f10cb69fce5d894bc2f
parentadded rotation support to POS (diff)
downloadopensim-SC-a1391d08481cae567bd6805ee073208a91ca14d3.zip
opensim-SC-a1391d08481cae567bd6805ee073208a91ca14d3.tar.gz
opensim-SC-a1391d08481cae567bd6805ee073208a91ca14d3.tar.bz2
opensim-SC-a1391d08481cae567bd6805ee073208a91ca14d3.tar.xz
fixed POS rotation with certain angles
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSPlugin.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
index e13cedd..572ffdd 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
+++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
@@ -136,18 +136,18 @@ namespace OpenSim.Region.Physics.POSPlugin
136 " sizeX: " + p.Size.X * 0.5 + 0.5); 136 " sizeX: " + p.Size.X * 0.5 + 0.5);
137 */ 137 */
138 138
139 Vector3 rotatedPos = p.Orientation.Inverse() * new Vector3(c.Position.X - p.Position.X, c.Position.Y - p.Position.Y, c.Position.Z - p.Position.Z);; 139 Vector3 rotatedPos = p.Orientation.Inverse() * new Vector3(c.Position.X - p.Position.X, c.Position.Y - p.Position.Y, c.Position.Z - p.Position.Z);
140 Vector3 avatarSize = p.Orientation.Inverse() * new Vector3(c.Size.X, c.Size.Y, c.Size.Z); 140 Vector3 avatarSize = p.Orientation.Inverse() * new Vector3(c.Size.X, c.Size.Y, c.Size.Z);
141 141
142 if (Math.Abs(rotatedPos.x) >= (p.Size.X * 0.5 + avatarSize.x)) 142 if (Math.Abs(rotatedPos.x) >= (p.Size.X * 0.5 + Math.Abs(avatarSize.x)))
143 { 143 {
144 return false; 144 return false;
145 } 145 }
146 if (Math.Abs(rotatedPos.y) >= (p.Size.Y * 0.5 + avatarSize.y)) 146 if (Math.Abs(rotatedPos.y) >= (p.Size.Y * 0.5 + Math.Abs(avatarSize.y)))
147 { 147 {
148 return false; 148 return false;
149 } 149 }
150 if (Math.Abs(rotatedPos.z) >= (p.Size.Z * 0.5 + avatarSize.z)) 150 if (Math.Abs(rotatedPos.z) >= (p.Size.Z * 0.5 + Math.Abs(avatarSize.z)))
151 { 151 {
152 return false; 152 return false;
153 } 153 }