aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorCharles Krinke2009-03-06 23:01:35 +0000
committerCharles Krinke2009-03-06 23:01:35 +0000
commitb637a11b58292cb6165317b317dc077a79ee6779 (patch)
tree18d9b2e82ae782fec726f3baa2d60c76433a7406 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
parentadd back .config files for all tests in an attempt to debug why these (diff)
downloadopensim-SC-b637a11b58292cb6165317b317dc077a79ee6779.zip
opensim-SC-b637a11b58292cb6165317b317dc077a79ee6779.tar.gz
opensim-SC-b637a11b58292cb6165317b317dc077a79ee6779.tar.bz2
opensim-SC-b637a11b58292cb6165317b317dc077a79ee6779.tar.xz
Fixes Mantis #3260. Thank you kindly, MCortez for a patch that:
llSetHoverHeight() should not clamp the x/y position of an object the way MoveTo does, and it should recalculate the absolute height to hover at as an object moves to reflect the current ground/water height under it. Correctly implementing required adjusting the Physics interfaces and implementing at the physics plug-in level. The attached is a patch that correctly implements llSetHoverHeight() including updates to the ODE physics plug-in.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs31
1 files changed, 31 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>