aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorKittoFlora2009-10-26 00:10:23 +0100
committerKittoFlora2009-10-26 00:10:23 +0100
commit8428b25939d39711e732eeb3928e8a8e64aad8a9 (patch)
tree4431c6743c579dcaa83a5f979496ccc574ae25e3 /OpenSim/Region/Framework
parentCommented out instrumentation in ODEPrim.cs (diff)
downloadopensim-SC_OLD-8428b25939d39711e732eeb3928e8a8e64aad8a9.zip
opensim-SC_OLD-8428b25939d39711e732eeb3928e8a8e64aad8a9.tar.gz
opensim-SC_OLD-8428b25939d39711e732eeb3928e8a8e64aad8a9.tar.bz2
opensim-SC_OLD-8428b25939d39711e732eeb3928e8a8e64aad8a9.tar.xz
Add llRotLookat pt1.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs39
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs12
2 files changed, 51 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 69b3ded..fff807a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1727,6 +1727,45 @@ namespace OpenSim.Region.Framework.Scenes
1727 } 1727 }
1728 } 1728 }
1729 1729
1730 public void rotLookAt(Quaternion target, float strength, float damping)
1731 {
1732 SceneObjectPart rootpart = m_rootPart;
1733 if (rootpart != null)
1734 {
1735 if (IsAttachment)
1736 {
1737 /*
1738 ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
1739 if (avatar != null)
1740 {
1741 Rotate the Av?
1742 } */
1743 }
1744 else
1745 {
1746 if (rootpart.PhysActor != null)
1747 {
1748 rootpart.PhysActor.APIDTarget = new Quaternion(target.X, target.Y, target.Z, target.W);
1749 rootpart.PhysActor.APIDStrength = strength;
1750 rootpart.PhysActor.APIDDamping = damping;
1751 rootpart.PhysActor.APIDActive = true;
1752 }
1753 }
1754 }
1755 }
1756 public void stopLookAt()
1757 {
1758 SceneObjectPart rootpart = m_rootPart;
1759 if (rootpart != null)
1760 {
1761 if (rootpart.PhysActor != null)
1762 {
1763 rootpart.PhysActor.APIDActive = false;
1764 }
1765 }
1766
1767 }
1768
1730 /// <summary> 1769 /// <summary>
1731 /// Uses a PID to attempt to clamp the object on the Z axis at the given height over tau seconds. 1770 /// Uses a PID to attempt to clamp the object on the Z axis at the given height over tau seconds.
1732 /// </summary> 1771 /// </summary>
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 32171a0..5f46f6f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2187,6 +2187,11 @@ if (m_shape != null) {
2187 ParentGroup.HasGroupChanged = true; 2187 ParentGroup.HasGroupChanged = true;
2188 ScheduleFullUpdate(); 2188 ScheduleFullUpdate();
2189 } 2189 }
2190
2191 public void RotLookAt(Quaternion target, float strength, float damping)
2192 {
2193 m_parentGroup.rotLookAt(target, strength, damping);
2194 }
2190 2195
2191 /// <summary> 2196 /// <summary>
2192 /// Schedules this prim for a full update 2197 /// Schedules this prim for a full update
@@ -2662,6 +2667,13 @@ if (m_shape != null) {
2662 SetText(text); 2667 SetText(text);
2663 } 2668 }
2664 2669
2670 public void StopLookAt()
2671 {
2672 m_parentGroup.stopLookAt();
2673
2674 m_parentGroup.ScheduleGroupForTerseUpdate();
2675 }
2676
2665 public void StopMoveToTarget() 2677 public void StopMoveToTarget()
2666 { 2678 {
2667 m_parentGroup.stopMoveToTarget(); 2679 m_parentGroup.stopMoveToTarget();