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 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>