diff options
author | Robert Adams | 2013-04-23 18:31:12 -0700 |
---|---|---|
committer | Robert Adams | 2013-04-23 18:31:12 -0700 |
commit | 522ab85045066cb58bb76881032adab7cc6a2d68 (patch) | |
tree | ed9343f819b4c4e08adafdc44c2fbbfdd33e41fe /OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | |
parent | revert CSJ2K.dll to version in use prior to commit d4fa2c69ed2895dcab76e0df1b... (diff) | |
download | opensim-SC_OLD-522ab85045066cb58bb76881032adab7cc6a2d68.zip opensim-SC_OLD-522ab85045066cb58bb76881032adab7cc6a2d68.tar.gz opensim-SC_OLD-522ab85045066cb58bb76881032adab7cc6a2d68.tar.bz2 opensim-SC_OLD-522ab85045066cb58bb76881032adab7cc6a2d68.tar.xz |
BulletSim: improve avatar stair walking up. Add more parameters to control force
of both position change and up force that move avatars over barrier.
Default parameters are for steps up to 0.5m in height.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSParam.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs index 06df85e..980d405 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | |||
@@ -128,6 +128,8 @@ public static class BSParam | |||
128 | public static float AvatarStepHeight { get; private set; } | 128 | public static float AvatarStepHeight { get; private set; } |
129 | public static float AvatarStepApproachFactor { get; private set; } | 129 | public static float AvatarStepApproachFactor { get; private set; } |
130 | public static float AvatarStepForceFactor { get; private set; } | 130 | public static float AvatarStepForceFactor { get; private set; } |
131 | public static float AvatarStepUpCorrectionFactor { get; private set; } | ||
132 | public static int AvatarStepSmoothingSteps { get; private set; } | ||
131 | 133 | ||
132 | // Vehicle parameters | 134 | // Vehicle parameters |
133 | public static float VehicleMaxLinearVelocity { get; private set; } | 135 | public static float VehicleMaxLinearVelocity { get; private set; } |
@@ -234,6 +236,7 @@ public static class BSParam | |||
234 | objectSet = pObjSetter; | 236 | objectSet = pObjSetter; |
235 | } | 237 | } |
236 | /* Wish I could simplify using this definition but CLR doesn't store references so closure around delegates of references won't work | 238 | /* Wish I could simplify using this definition but CLR doesn't store references so closure around delegates of references won't work |
239 | * TODO: Maybe use reflection and the name of the variable to create a reference for the getter/setter. | ||
237 | public ParameterDefn(string pName, string pDesc, T pDefault, ref T loc) | 240 | public ParameterDefn(string pName, string pDesc, T pDefault, ref T loc) |
238 | : base(pName, pDesc) | 241 | : base(pName, pDesc) |
239 | { | 242 | { |
@@ -561,7 +564,7 @@ public static class BSParam | |||
561 | (s) => { return AvatarBelowGroundUpCorrectionMeters; }, | 564 | (s) => { return AvatarBelowGroundUpCorrectionMeters; }, |
562 | (s,v) => { AvatarBelowGroundUpCorrectionMeters = v; } ), | 565 | (s,v) => { AvatarBelowGroundUpCorrectionMeters = v; } ), |
563 | new ParameterDefn<float>("AvatarStepHeight", "Height of a step obstacle to consider step correction", | 566 | new ParameterDefn<float>("AvatarStepHeight", "Height of a step obstacle to consider step correction", |
564 | 0.3f, | 567 | 0.6f, |
565 | (s) => { return AvatarStepHeight; }, | 568 | (s) => { return AvatarStepHeight; }, |
566 | (s,v) => { AvatarStepHeight = v; } ), | 569 | (s,v) => { AvatarStepHeight = v; } ), |
567 | new ParameterDefn<float>("AvatarStepApproachFactor", "Factor to control angle of approach to step (0=straight on)", | 570 | new ParameterDefn<float>("AvatarStepApproachFactor", "Factor to control angle of approach to step (0=straight on)", |
@@ -569,9 +572,17 @@ public static class BSParam | |||
569 | (s) => { return AvatarStepApproachFactor; }, | 572 | (s) => { return AvatarStepApproachFactor; }, |
570 | (s,v) => { AvatarStepApproachFactor = v; } ), | 573 | (s,v) => { AvatarStepApproachFactor = v; } ), |
571 | new ParameterDefn<float>("AvatarStepForceFactor", "Controls the amount of force up applied to step up onto a step", | 574 | new ParameterDefn<float>("AvatarStepForceFactor", "Controls the amount of force up applied to step up onto a step", |
572 | 2.0f, | 575 | 1.0f, |
573 | (s) => { return AvatarStepForceFactor; }, | 576 | (s) => { return AvatarStepForceFactor; }, |
574 | (s,v) => { AvatarStepForceFactor = v; } ), | 577 | (s,v) => { AvatarStepForceFactor = v; } ), |
578 | new ParameterDefn<float>("AvatarStepUpCorrectionFactor", "Multiplied by height of step collision to create up movement at step", | ||
579 | 1.0f, | ||
580 | (s) => { return AvatarStepUpCorrectionFactor; }, | ||
581 | (s,v) => { AvatarStepUpCorrectionFactor = v; } ), | ||
582 | new ParameterDefn<int>("AvatarStepSmoothingSteps", "Number of frames after a step collision that we continue walking up stairs", | ||
583 | 2, | ||
584 | (s) => { return AvatarStepSmoothingSteps; }, | ||
585 | (s,v) => { AvatarStepSmoothingSteps = v; } ), | ||
575 | 586 | ||
576 | new ParameterDefn<float>("VehicleMaxLinearVelocity", "Maximum velocity magnitude that can be assigned to a vehicle", | 587 | new ParameterDefn<float>("VehicleMaxLinearVelocity", "Maximum velocity magnitude that can be assigned to a vehicle", |
577 | 1000.0f, | 588 | 1000.0f, |