diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 39 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 12 |
2 files changed, 51 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index bcc9b37..ea4f2c7 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> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index c0fd437..bf2f3d3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2175,6 +2175,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2175 | ParentGroup.HasGroupChanged = true; | 2175 | ParentGroup.HasGroupChanged = true; |
2176 | ScheduleFullUpdate(); | 2176 | ScheduleFullUpdate(); |
2177 | } | 2177 | } |
2178 | |||
2179 | public void RotLookAt(Quaternion target, float strength, float damping) | ||
2180 | { | ||
2181 | m_parentGroup.rotLookAt(target, strength, damping); | ||
2182 | } | ||
2178 | 2183 | ||
2179 | /// <summary> | 2184 | /// <summary> |
2180 | /// Schedules this prim for a full update | 2185 | /// Schedules this prim for a full update |
@@ -2674,6 +2679,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2674 | SetText(text); | 2679 | SetText(text); |
2675 | } | 2680 | } |
2676 | 2681 | ||
2682 | public void StopLookAt() | ||
2683 | { | ||
2684 | m_parentGroup.stopLookAt(); | ||
2685 | |||
2686 | m_parentGroup.ScheduleGroupForTerseUpdate(); | ||
2687 | } | ||
2688 | |||
2677 | public void StopMoveToTarget() | 2689 | public void StopMoveToTarget() |
2678 | { | 2690 | { |
2679 | m_parentGroup.stopMoveToTarget(); | 2691 | m_parentGroup.stopMoveToTarget(); |