diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 9d228fa41f..3d5f106f98 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -245,17 +245,17 @@ namespace OpenSim.Region.ScriptEngine.Common public LSL_Types.Vector3 llRot2Fwd(LSL_Types.Quaternion r) { - return new LSL_Types.Vector3(); + return (new LSL_Types.Vector3(1,0,0) * r); } public LSL_Types.Vector3 llRot2Left(LSL_Types.Quaternion r) { - return new LSL_Types.Vector3(); + return (new LSL_Types.Vector3(0, 1, 0) * r); } public LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r) { - return new LSL_Types.Vector3(); + return (new LSL_Types.Vector3(0, 0, 1) * r); } public LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 a, LSL_Types.Vector3 b) { diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs index bbdd4eefb5..fc0e2825f3 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs @@ -80,6 +80,11 @@ namespace OpenSim.Region.ScriptEngine.Common return "<" + x.ToString() + ", " + y.ToString() + ", " + z.ToString() + ">"; } + public static explicit operator string(Vector3 vec) + { + return "<" + vec.x.ToString() + ", " + vec.y.ToString() + ", " + vec.z.ToString() + ">"; + } + public static bool operator ==(Vector3 lhs, Vector3 rhs) { return (lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z);