diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs index 2e0f2e3..e13cedd 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | |||
@@ -135,15 +135,19 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
135 | " absX: " + Math.Abs(p.Position.X - c.Position.X) + | 135 | " absX: " + Math.Abs(p.Position.X - c.Position.X) + |
136 | " sizeX: " + p.Size.X * 0.5 + 0.5); | 136 | " sizeX: " + p.Size.X * 0.5 + 0.5); |
137 | */ | 137 | */ |
138 | if (Math.Abs(p.Position.X - c.Position.X) >= (p.Size.X * 0.5 + 0.5)) | 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);; | ||
140 | Vector3 avatarSize = p.Orientation.Inverse() * new Vector3(c.Size.X, c.Size.Y, c.Size.Z); | ||
141 | |||
142 | if (Math.Abs(rotatedPos.x) >= (p.Size.X * 0.5 + avatarSize.x)) | ||
139 | { | 143 | { |
140 | return false; | 144 | return false; |
141 | } | 145 | } |
142 | if (Math.Abs(p.Position.Y - c.Position.Y) >= (p.Size.Y * 0.5 + 0.5)) | 146 | if (Math.Abs(rotatedPos.y) >= (p.Size.Y * 0.5 + avatarSize.y)) |
143 | { | 147 | { |
144 | return false; | 148 | return false; |
145 | } | 149 | } |
146 | if (Math.Abs(p.Position.Z - c.Position.Z) >= (p.Size.Z * 0.5 + 1.0)) | 150 | if (Math.Abs(rotatedPos.z) >= (p.Size.Z * 0.5 + avatarSize.z)) |
147 | { | 151 | { |
148 | return false; | 152 | return false; |
149 | } | 153 | } |
@@ -338,7 +342,7 @@ namespace OpenSim.Region.Physics.POSPlugin | |||
338 | 342 | ||
339 | public override PhysicsVector Size | 343 | public override PhysicsVector Size |
340 | { | 344 | { |
341 | get { return new PhysicsVector(0, 0, 0); } | 345 | get { return new PhysicsVector(0.5f, 0.5f, 1.0f); } |
342 | set { } | 346 | set { } |
343 | } | 347 | } |
344 | 348 | ||