aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorMic Bowman2012-01-13 14:48:56 -0800
committerMic Bowman2012-01-13 14:48:56 -0800
commite1a2c44ebe8f10cf00a14578e44b000ff16b68df (patch)
tree00d0dd19ce7a3f4f67d8625868c594777132de27 /OpenSim/Region/ScriptEngine/Shared
parentFix llRotLookAt and llLookAt for non-physical objects. Per conversation (diff)
downloadopensim-SC_OLD-e1a2c44ebe8f10cf00a14578e44b000ff16b68df.zip
opensim-SC_OLD-e1a2c44ebe8f10cf00a14578e44b000ff16b68df.tar.gz
opensim-SC_OLD-e1a2c44ebe8f10cf00a14578e44b000ff16b68df.tar.bz2
opensim-SC_OLD-e1a2c44ebe8f10cf00a14578e44b000ff16b68df.tar.xz
Cleaned up the LookAt code in SOP and SOG. Added support for incrementally
rotating physical objects. This does not use physics. Currently the rate of change is determined as 1 / (PI * Strength).
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 30145c7..ab175ba 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2865,13 +2865,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2865 2865
2866 // Per discussion with Melanie, for non-physical objects llLookAt appears to simply 2866 // Per discussion with Melanie, for non-physical objects llLookAt appears to simply
2867 // set the rotation of the object, copy that behavior 2867 // set the rotation of the object, copy that behavior
2868 if (m_host.PhysActor == null || !m_host.PhysActor.IsPhysical) 2868 if (strength == 0 || m_host.PhysActor == null || !m_host.PhysActor.IsPhysical)
2869 { 2869 {
2870 llSetRot(rot); 2870 llSetRot(rot);
2871 } 2871 }
2872 else 2872 else
2873 { 2873 {
2874 m_host.startLookAt(Rot2Quaternion(rot), (float)damping, (float)strength); 2874 m_host.StartLookAt(Rot2Quaternion(rot), (float)strength, (float)damping);
2875 } 2875 }
2876 } 2876 }
2877 2877
@@ -3251,13 +3251,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3251 3251
3252 // Per discussion with Melanie, for non-physical objects llLookAt appears to simply 3252 // Per discussion with Melanie, for non-physical objects llLookAt appears to simply
3253 // set the rotation of the object, copy that behavior 3253 // set the rotation of the object, copy that behavior
3254 if (m_host.PhysActor == null || !m_host.PhysActor.IsPhysical) 3254 if (strength == 0 || m_host.PhysActor == null || !m_host.PhysActor.IsPhysical)
3255 { 3255 {
3256 llSetLocalRot(target); 3256 llSetLocalRot(target);
3257 } 3257 }
3258 else 3258 else
3259 { 3259 {
3260 m_host.RotLookAt(Rot2Quaternion(target), (float)damping, (float)strength); 3260 m_host.RotLookAt(Rot2Quaternion(target), (float)strength, (float)damping);
3261 } 3261 }
3262 } 3262 }
3263 3263