aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-01-17 14:59:05 +0000
committerTeravus Ovares2008-01-17 14:59:05 +0000
commit18c959df12983256d73240a86fa0bad12c4e36ce (patch)
treed85ef34d3196461f8d3dd0ae653b37912f098a7e /OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
parent* added ForEachPart helper (diff)
downloadopensim-SC-18c959df12983256d73240a86fa0bad12c4e36ce.zip
opensim-SC-18c959df12983256d73240a86fa0bad12c4e36ce.tar.gz
opensim-SC-18c959df12983256d73240a86fa0bad12c4e36ce.tar.bz2
opensim-SC-18c959df12983256d73240a86fa0bad12c4e36ce.tar.xz
* Added llApplyImpulse in the global frame. The object must be physical before this'll do anything. Be careful with this function as it's easy to loose prim.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 0cb4ae7..ce38bee 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -520,6 +520,21 @@ namespace OpenSim.Region.Environment.Scenes
520 520
521 protected PrimitiveBaseShape m_shape; 521 protected PrimitiveBaseShape m_shape;
522 522
523 /// <summary>
524 /// hook to the physics scene to apply impulse
525 /// This is sent up to the group, which then finds the root prim
526 /// and applies the force on the root prim of the group
527 /// </summary>
528 /// <param name="impulse">Vector force</param>
529 public void ApplyImpulse(LLVector3 impulsei)
530 {
531 PhysicsVector impulse = new PhysicsVector(impulsei.X, impulsei.Y, impulsei.Z);
532 if (m_parentGroup != null)
533 {
534 m_parentGroup.applyImpulse(impulse);
535 }
536 }
537
523 public void TriggerScriptChangedEvent(Changed val) 538 public void TriggerScriptChangedEvent(Changed val)
524 { 539 {
525 if (m_parentGroup != null) 540 if (m_parentGroup != null)