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 6ec2a01..f36ff1d 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 public void rotLookAt(Quaternion target, float strength, float damping)
1738 {
1739 SceneObjectPart rootpart = m_rootPart;
1740 if (rootpart != null)
1741 {
1742 if (IsAttachment)
1743 {
1744 /*
1745 ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
1746 if (avatar != null)
1747 {
1748 Rotate the Av?
1749 } */
1750 }
1751 else
1752 {
1753 if (rootpart.PhysActor != null)
1754 {
1755 rootpart.PhysActor.APIDTarget = new Quaternion(target.X, target.Y, target.Z, target.W);
1756 rootpart.PhysActor.APIDStrength = strength;
1757 rootpart.PhysActor.APIDDamping = damping;
1758 rootpart.PhysActor.APIDActive = true;
1759 }
1760 }
1761 }
1762 }
1763 public void stopLookAt()
1764 {
1765 SceneObjectPart rootpart = m_rootPart;
1766 if (rootpart != null)
1767 {
1768 if (rootpart.PhysActor != null)
1769 {
1770 rootpart.PhysActor.APIDActive = false;
1771 }
1772 }
1773
1774 }
1775
1737 /// <summary> 1776 /// <summary>
1738 /// Uses a PID to attempt to clamp the object on the Z axis at the given height over tau seconds. 1777 /// Uses a PID to attempt to clamp the object on the Z axis at the given height over tau seconds.
1739 /// </summary> 1778 /// </summary>