diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 18 |
2 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 2875874..2f2a1be 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -694,6 +694,25 @@ namespace OpenSim.Region.Environment.Scenes | |||
694 | } | 694 | } |
695 | } | 695 | } |
696 | 696 | ||
697 | public void moveToTarget(LLVector3 target, float tau) | ||
698 | { | ||
699 | SceneObjectPart rootpart = m_rootPart; | ||
700 | if (rootpart != null) | ||
701 | { | ||
702 | rootpart.PhysActor.PIDTarget = new PhysicsVector(target.X, target.Y, target.Z); | ||
703 | rootpart.PhysActor.PIDTau = tau; | ||
704 | rootpart.PhysActor.PIDActive = true; | ||
705 | } | ||
706 | } | ||
707 | public void stopMoveToTarget() | ||
708 | { | ||
709 | SceneObjectPart rootpart = m_rootPart; | ||
710 | if (rootpart != null) | ||
711 | { | ||
712 | rootpart.PhysActor.PIDActive = false; | ||
713 | } | ||
714 | } | ||
715 | |||
697 | public void SetRootPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID) | 716 | public void SetRootPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID) |
698 | { | 717 | { |
699 | part.LastOwnerID = part.OwnerID; | 718 | part.LastOwnerID = part.OwnerID; |
@@ -2019,5 +2038,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2019 | } | 2038 | } |
2020 | } | 2039 | } |
2021 | } | 2040 | } |
2041 | |||
2042 | |||
2022 | } | 2043 | } |
2023 | } | 2044 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 48177dc..cbefc19 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -586,6 +586,24 @@ namespace OpenSim.Region.Environment.Scenes | |||
586 | } | 586 | } |
587 | } | 587 | } |
588 | 588 | ||
589 | public void MoveToTarget(LLVector3 target, float tau) | ||
590 | { | ||
591 | if (tau > 0) | ||
592 | { | ||
593 | m_parentGroup.moveToTarget(target, tau); | ||
594 | } | ||
595 | else | ||
596 | { | ||
597 | StopMoveToTarget(); | ||
598 | } | ||
599 | |||
600 | } | ||
601 | |||
602 | public void StopMoveToTarget() | ||
603 | { | ||
604 | m_parentGroup.stopMoveToTarget(); | ||
605 | } | ||
606 | |||
589 | public void TriggerScriptChangedEvent(Changed val) | 607 | public void TriggerScriptChangedEvent(Changed val) |
590 | { | 608 | { |
591 | if (m_parentGroup != null) | 609 | if (m_parentGroup != null) |