diff options
author | KittoFlora | 2009-10-26 00:10:23 +0100 |
---|---|---|
committer | KittoFlora | 2009-10-26 00:10:23 +0100 |
commit | 8428b25939d39711e732eeb3928e8a8e64aad8a9 (patch) | |
tree | 4431c6743c579dcaa83a5f979496ccc574ae25e3 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |
parent | Commented out instrumentation in ODEPrim.cs (diff) | |
download | opensim-SC-8428b25939d39711e732eeb3928e8a8e64aad8a9.zip opensim-SC-8428b25939d39711e732eeb3928e8a8e64aad8a9.tar.gz opensim-SC-8428b25939d39711e732eeb3928e8a8e64aad8a9.tar.bz2 opensim-SC-8428b25939d39711e732eeb3928e8a8e64aad8a9.tar.xz |
Add llRotLookat pt1.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 39 |
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> |