From a1391d08481cae567bd6805ee073208a91ca14d3 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Mon, 19 Nov 2007 05:28:00 +0000 Subject: fixed POS rotation with certain angles --- OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Physics/POSPlugin') 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 " sizeX: " + p.Size.X * 0.5 + 0.5); */ - 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);; + 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); Vector3 avatarSize = p.Orientation.Inverse() * new Vector3(c.Size.X, c.Size.Y, c.Size.Z); - if (Math.Abs(rotatedPos.x) >= (p.Size.X * 0.5 + avatarSize.x)) + if (Math.Abs(rotatedPos.x) >= (p.Size.X * 0.5 + Math.Abs(avatarSize.x))) { return false; } - if (Math.Abs(rotatedPos.y) >= (p.Size.Y * 0.5 + avatarSize.y)) + if (Math.Abs(rotatedPos.y) >= (p.Size.Y * 0.5 + Math.Abs(avatarSize.y))) { return false; } - if (Math.Abs(rotatedPos.z) >= (p.Size.Z * 0.5 + avatarSize.z)) + if (Math.Abs(rotatedPos.z) >= (p.Size.Z * 0.5 + Math.Abs(avatarSize.z))) { return false; } -- cgit v1.1