aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Manager/PhysicsActor.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/Physics/Manager/PhysicsActor.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/Physics/Manager/PhysicsActor.cs')
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs26
1 files changed, 25 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index 0f75c46..c4bb889 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -44,6 +44,14 @@ namespace OpenSim.Region.Physics.Manager
44 Ground = 3 44 Ground = 3
45 } 45 }
46 46
47 public enum PIDHoverType
48 {
49 Ground
50 , GroundAndWater
51 , Water
52 , Absolute
53 }
54
47 public class CollisionEventUpdate : EventArgs 55 public class CollisionEventUpdate : EventArgs
48 { 56 {
49 // Raising the event on the object, so don't need to provide location.. further up the tree knows that info. 57 // Raising the event on the object, so don't need to provide location.. further up the tree knows that info.
@@ -204,9 +212,20 @@ namespace OpenSim.Region.Physics.Manager
204 public abstract PhysicsVector RotationalVelocity { get; set; } 212 public abstract PhysicsVector RotationalVelocity { get; set; }
205 public abstract bool Kinematic { get; set; } 213 public abstract bool Kinematic { get; set; }
206 public abstract float Buoyancy { get; set; } 214 public abstract float Buoyancy { get; set; }
215
216 // Used for MoveTo
207 public abstract PhysicsVector PIDTarget { set;} 217 public abstract PhysicsVector PIDTarget { set;}
208 public abstract bool PIDActive { set;} 218 public abstract bool PIDActive { set;}
209 public abstract float PIDTau { set; } 219 public abstract float PIDTau { set; }
220
221 // Used for llSetHoverHeight and maybe vehicle height
222 // Hover Height will override MoveTo target's Z
223 public abstract bool PIDHoverActive { set;}
224 public abstract float PIDHoverHeight { set;}
225 public abstract PIDHoverType PIDHoverType { set;}
226 public abstract float PIDHoverTau { set;}
227
228
210 public abstract void AddForce(PhysicsVector force, bool pushforce); 229 public abstract void AddForce(PhysicsVector force, bool pushforce);
211 public abstract void AddAngularForce(PhysicsVector force, bool pushforce); 230 public abstract void AddAngularForce(PhysicsVector force, bool pushforce);
212 public abstract void SetMomentum(PhysicsVector momentum); 231 public abstract void SetMomentum(PhysicsVector momentum);
@@ -430,6 +449,11 @@ namespace OpenSim.Region.Physics.Manager
430 public override bool PIDActive { set { return; } } 449 public override bool PIDActive { set { return; } }
431 public override float PIDTau { set { return; } } 450 public override float PIDTau { set { return; } }
432 451
452 public override float PIDHoverHeight { set { return; } }
453 public override bool PIDHoverActive { set { return; } }
454 public override PIDHoverType PIDHoverType { set { return; } }
455 public override float PIDHoverTau { set { return; } }
456
433 public override void SetMomentum(PhysicsVector momentum) 457 public override void SetMomentum(PhysicsVector momentum)
434 { 458 {
435 } 459 }