aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs31
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs17
2 files changed, 48 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 4f61342..a88f8a9 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1617,6 +1617,37 @@ namespace OpenSim.Region.Framework.Scenes
1617 } 1617 }
1618 1618
1619 /// <summary> 1619 /// <summary>
1620 /// Uses a PID to attempt to clamp the object on the Z axis at the given height over tau seconds.
1621 /// </summary>
1622 /// <param name="height">Height to hover. Height of zero disables hover.</param>
1623 /// <param name="hoverType">Determines what the height is relative to </param>
1624 /// <param name="tau">Number of seconds over which to reach target</param>
1625 public void SetHoverHeight(float height, PIDHoverType hoverType, float tau)
1626 {
1627 SceneObjectPart rootpart = m_rootPart;
1628 if (rootpart != null)
1629 {
1630 if (rootpart.PhysActor != null)
1631 {
1632 if (height != 0f)
1633 {
1634 rootpart.PhysActor.PIDHoverHeight = height;
1635 rootpart.PhysActor.PIDHoverType = hoverType;
1636 rootpart.PhysActor.PIDTau = tau;
1637 rootpart.PhysActor.PIDHoverActive = true;
1638 }
1639 else
1640 {
1641 rootpart.PhysActor.PIDHoverActive = false;
1642 }
1643 }
1644 }
1645 }
1646
1647
1648
1649
1650 /// <summary>
1620 /// Set the owner of the root part. 1651 /// Set the owner of the root part.
1621 /// </summary> 1652 /// </summary>
1622 /// <param name="part"></param> 1653 /// <param name="part"></param>
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index ede007e..4efadc3 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1748,6 +1748,23 @@ if (m_shape != null) {
1748 } 1748 }
1749 } 1749 }
1750 1750
1751 /// <summary>
1752 /// Uses a PID to attempt to clamp the object on the Z axis at the given height over tau seconds.
1753 /// </summary>
1754 /// <param name="height">Height to hover. Height of zero disables hover.</param>
1755 /// <param name="hoverType">Determines what the height is relative to </param>
1756 /// <param name="tau">Number of seconds over which to reach target</param>
1757 public void SetHoverHeight(float height, PIDHoverType hoverType, float tau)
1758 {
1759 m_parentGroup.SetHoverHeight(height, hoverType, tau);
1760 }
1761
1762 public void StopHover()
1763 {
1764 m_parentGroup.SetHoverHeight(0f, PIDHoverType.Ground, 0f);
1765 }
1766
1767
1751 public virtual void OnGrab(Vector3 offsetPos, IClientAPI remoteClient) 1768 public virtual void OnGrab(Vector3 offsetPos, IClientAPI remoteClient)
1752 { 1769 {
1753 } 1770 }