aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-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 cb87212..e9ed066 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1734,6 +1734,45 @@ namespace OpenSim.Region.Framework.Scenes
1734 } 1734 }
1735 } 1735 }
1736 } 1736 }
1737
1738 public void rotLookAt(Quaternion target, float strength, float damping)
1739 {
1740 SceneObjectPart rootpart = m_rootPart;
1741 if (rootpart != null)
1742 {
1743 if (IsAttachment)
1744 {
1745 /*
1746 ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
1747 if (avatar != null)
1748 {
1749 Rotate the Av?
1750 } */
1751 }
1752 else
1753 {
1754 if (rootpart.PhysActor != null)
1755 {
1756 rootpart.PhysActor.APIDTarget = new Quaternion(target.X, target.Y, target.Z, target.W);
1757 rootpart.PhysActor.APIDStrength = strength;
1758 rootpart.PhysActor.APIDDamping = damping;
1759 rootpart.PhysActor.APIDActive = true;
1760 }
1761 }
1762 }
1763 }
1764 public void stopLookAt()
1765 {
1766 SceneObjectPart rootpart = m_rootPart;
1767 if (rootpart != null)
1768 {
1769 if (rootpart.PhysActor != null)
1770 {
1771 rootpart.PhysActor.APIDActive = false;
1772 }
1773 }
1774
1775 }
1737 1776
1738 /// <summary> 1777 /// <summary>
1739 /// Uses a PID to attempt to clamp the object on the Z axis at the given height over tau seconds. 1778 /// Uses a PID to attempt to clamp the object on the Z axis at the given height over tau seconds.
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index b6916f2..c0243a5 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2185,6 +2185,11 @@ namespace OpenSim.Region.Framework.Scenes
2185 ParentGroup.HasGroupChanged = true; 2185 ParentGroup.HasGroupChanged = true;
2186 ScheduleFullUpdate(); 2186 ScheduleFullUpdate();
2187 } 2187 }
2188
2189 public void RotLookAt(Quaternion target, float strength, float damping)
2190 {
2191 m_parentGroup.rotLookAt(target, strength, damping);
2192 }
2188 2193
2189 /// <summary> 2194 /// <summary>
2190 /// Schedules this prim for a full update 2195 /// Schedules this prim for a full update
@@ -2668,7 +2673,14 @@ namespace OpenSim.Region.Framework.Scenes
2668 ParentGroup.HasGroupChanged = true; 2673 ParentGroup.HasGroupChanged = true;
2669 ScheduleFullUpdate(); 2674 ScheduleFullUpdate();
2670 } 2675 }
2676
2677 public void StopLookAt()
2678 {
2679 m_parentGroup.stopLookAt();
2671 2680
2681 m_parentGroup.ScheduleGroupForTerseUpdate();
2682 }
2683
2672 /// <summary> 2684 /// <summary>
2673 /// Set the text displayed for this part. 2685 /// Set the text displayed for this part.
2674 /// </summary> 2686 /// </summary>