aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs39
1 files changed, 39 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.