* Adds Normal to the fields returned by the Physics Raycaster

* Fixes recognizing when a sit target is and isn't set.
* * 1. Vector3.Zero.
* * 2. Orientation: x:0, y:0, z:0, w:1 - ZERO_ROTATION
* * (or) Orientation: x:0, y:0, z:0, w:0 - Invalid Quaternion
* * (or) Orientation: x:0, y:0, z:1, w:0 - Invalid mapping, some older objects still exist with it
This commit is contained in:
Teravus Ovares (Dan Olivares)
2009-12-05 22:18:00 -05:00
parent 8e089b6d8d
commit 8d196dbd14
3 changed files with 30 additions and 8 deletions

View File

@@ -36,7 +36,7 @@ namespace OpenSim.Region.Physics.Manager
{
public delegate void physicsCrash();
public delegate void RaycastCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance);
public delegate void RaycastCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 normal);
public abstract class PhysicsScene
{
@@ -204,7 +204,7 @@ namespace OpenSim.Region.Physics.Manager
public virtual void RaycastWorld(Vector3 position, Vector3 direction, float length, RaycastCallback retMethod)
{
if (retMethod != null)
retMethod(false, Vector3.Zero, 0, 999999999999f);
retMethod(false, Vector3.Zero, 0, 999999999999f, Vector3.Zero);
}
private class NullPhysicsScene : PhysicsScene