diff options
author | Robert Adams | 2013-01-07 16:05:02 -0800 |
---|---|---|
committer | Robert Adams | 2013-01-07 16:05:02 -0800 |
commit | 8452c0a8702ccf7ea045740dd829c69a6f509845 (patch) | |
tree | a2c094fbded7a502dc997d1eb4252659eddbb003 /OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | |
parent | BulletSim: fix exception when re-creating the terrain when loading an OAR file (diff) | |
download | opensim-SC_OLD-8452c0a8702ccf7ea045740dd829c69a6f509845.zip opensim-SC_OLD-8452c0a8702ccf7ea045740dd829c69a6f509845.tar.gz opensim-SC_OLD-8452c0a8702ccf7ea045740dd829c69a6f509845.tar.bz2 opensim-SC_OLD-8452c0a8702ccf7ea045740dd829c69a6f509845.tar.xz |
BulletSim: add function to push avatar up when hitting stairs.
It looks like BulletSim and ODE rely on penetration correction to cause
the avatar to move up and thus allowing walking up stairs. Object
penetration was minimized for walking and flying (so one doesn't go
through walls) and this stopped stairs from working. This commit
introduces avatar movement code to check for collisions at the
feet while walking and attempts to raise the avatar for the steps.
Not yet perfect but movement is better.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSParam.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs index b9bd0bf..23d573f 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | |||
@@ -75,6 +75,9 @@ public static class BSParam | |||
75 | public static float AvatarCapsuleDepth { get; private set; } | 75 | public static float AvatarCapsuleDepth { get; private set; } |
76 | public static float AvatarCapsuleHeight { get; private set; } | 76 | public static float AvatarCapsuleHeight { get; private set; } |
77 | public static float AvatarContactProcessingThreshold { get; private set; } | 77 | public static float AvatarContactProcessingThreshold { get; private set; } |
78 | public static float AvatarStepHeight { get; private set; } | ||
79 | public static float AvatarStepApproachFactor { get; private set; } | ||
80 | public static float AvatarStepForceFactor { get; private set; } | ||
78 | 81 | ||
79 | public static float VehicleAngularDamping { get; private set; } | 82 | public static float VehicleAngularDamping { get; private set; } |
80 | 83 | ||
@@ -403,6 +406,21 @@ public static class BSParam | |||
403 | (s,cf,p,v) => { AvatarContactProcessingThreshold = cf.GetFloat(p, v); }, | 406 | (s,cf,p,v) => { AvatarContactProcessingThreshold = cf.GetFloat(p, v); }, |
404 | (s) => { return AvatarContactProcessingThreshold; }, | 407 | (s) => { return AvatarContactProcessingThreshold; }, |
405 | (s,p,l,v) => { s.UpdateParameterObject((x)=>{AvatarContactProcessingThreshold=x;}, p, l, v); } ), | 408 | (s,p,l,v) => { s.UpdateParameterObject((x)=>{AvatarContactProcessingThreshold=x;}, p, l, v); } ), |
409 | new ParameterDefn("AvatarStepHeight", "Height of a step obstacle to consider step correction", | ||
410 | 0.3f, | ||
411 | (s,cf,p,v) => { AvatarStepHeight = cf.GetFloat(p, v); }, | ||
412 | (s) => { return AvatarStepHeight; }, | ||
413 | (s,p,l,v) => { AvatarStepHeight = v; } ), | ||
414 | new ParameterDefn("AvatarStepApproachFactor", "Factor to control angle of approach to step (0=straight on)", | ||
415 | 0.6f, | ||
416 | (s,cf,p,v) => { AvatarStepApproachFactor = cf.GetFloat(p, v); }, | ||
417 | (s) => { return AvatarStepApproachFactor; }, | ||
418 | (s,p,l,v) => { AvatarStepApproachFactor = v; } ), | ||
419 | new ParameterDefn("AvatarStepForceFactor", "Controls the amount of force up applied to step up onto a step", | ||
420 | 2.0f, | ||
421 | (s,cf,p,v) => { AvatarStepForceFactor = cf.GetFloat(p, v); }, | ||
422 | (s) => { return AvatarStepForceFactor; }, | ||
423 | (s,p,l,v) => { AvatarStepForceFactor = v; } ), | ||
406 | 424 | ||
407 | new ParameterDefn("VehicleAngularDamping", "Factor to damp vehicle angular movement per second (0.0 - 1.0)", | 425 | new ParameterDefn("VehicleAngularDamping", "Factor to damp vehicle angular movement per second (0.0 - 1.0)", |
408 | 0.95f, | 426 | 0.95f, |