diff options
author | Jeff Ames | 2007-11-19 05:28:00 +0000 |
---|---|---|
committer | Jeff Ames | 2007-11-19 05:28:00 +0000 |
commit | a1391d08481cae567bd6805ee073208a91ca14d3 (patch) | |
tree | 33203cdace0f61ced5bc0f10cb69fce5d894bc2f /OpenSim/Region | |
parent | added rotation support to POS (diff) | |
download | opensim-SC_OLD-a1391d08481cae567bd6805ee073208a91ca14d3.zip opensim-SC_OLD-a1391d08481cae567bd6805ee073208a91ca14d3.tar.gz opensim-SC_OLD-a1391d08481cae567bd6805ee073208a91ca14d3.tar.bz2 opensim-SC_OLD-a1391d08481cae567bd6805ee073208a91ca14d3.tar.xz |
fixed POS rotation with certain angles
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | 8 |
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 | } |