diff options
author | Robert Adams | 2013-07-24 10:52:54 -0700 |
---|---|---|
committer | Robert Adams | 2013-07-30 07:22:43 -0700 |
commit | 5a7784a0e6c3f549d0e7b59380ad05729cb93a4f (patch) | |
tree | 99b327c183b30b613da2368237fe6726d112623f /OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | |
parent | minor: Add timeout secs to connection timeout message. Change message to ref... (diff) | |
download | opensim-SC_OLD-5a7784a0e6c3f549d0e7b59380ad05729cb93a4f.zip opensim-SC_OLD-5a7784a0e6c3f549d0e7b59380ad05729cb93a4f.tar.gz opensim-SC_OLD-5a7784a0e6c3f549d0e7b59380ad05729cb93a4f.tar.bz2 opensim-SC_OLD-5a7784a0e6c3f549d0e7b59380ad05729cb93a4f.tar.xz |
BulletSim: make density display and return value consistant with how
the simulator expects it (scaled to 100kg/m^3).
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSParam.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs index 0bdb5f1..4520171 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | |||
@@ -463,7 +463,7 @@ public static class BSParam | |||
463 | // Density is passed around as 100kg/m3. This scales that to 1kg/m3. | 463 | // Density is passed around as 100kg/m3. This scales that to 1kg/m3. |
464 | // Reduce by power of 100 because Bullet doesn't seem to handle objects with large mass very well | 464 | // Reduce by power of 100 because Bullet doesn't seem to handle objects with large mass very well |
465 | new ParameterDefn<float>("DensityScaleFactor", "Conversion for simulator/viewer density (100kg/m3) to physical density (1kg/m3)", | 465 | new ParameterDefn<float>("DensityScaleFactor", "Conversion for simulator/viewer density (100kg/m3) to physical density (1kg/m3)", |
466 | 0.0001f ), | 466 | 0.01f ), |
467 | 467 | ||
468 | new ParameterDefn<float>("PID_D", "Derivitive factor for motion smoothing", | 468 | new ParameterDefn<float>("PID_D", "Derivitive factor for motion smoothing", |
469 | 2200f ), | 469 | 2200f ), |
@@ -474,8 +474,9 @@ public static class BSParam | |||
474 | 0.2f, | 474 | 0.2f, |
475 | (s) => { return DefaultFriction; }, | 475 | (s) => { return DefaultFriction; }, |
476 | (s,v) => { DefaultFriction = v; s.UnmanagedParams[0].defaultFriction = v; } ), | 476 | (s,v) => { DefaultFriction = v; s.UnmanagedParams[0].defaultFriction = v; } ), |
477 | // For historical reasons, the viewer and simulator multiply the density by 100 | ||
477 | new ParameterDefn<float>("DefaultDensity", "Density for new objects" , | 478 | new ParameterDefn<float>("DefaultDensity", "Density for new objects" , |
478 | 10.000006836f, // Aluminum g/cm3 | 479 | 1000.0006836f, // Aluminum g/cm3 * 100 |
479 | (s) => { return DefaultDensity; }, | 480 | (s) => { return DefaultDensity; }, |
480 | (s,v) => { DefaultDensity = v; s.UnmanagedParams[0].defaultDensity = v; } ), | 481 | (s,v) => { DefaultDensity = v; s.UnmanagedParams[0].defaultDensity = v; } ), |
481 | new ParameterDefn<float>("DefaultRestitution", "Bouncyness of an object" , | 482 | new ParameterDefn<float>("DefaultRestitution", "Bouncyness of an object" , |
@@ -555,8 +556,9 @@ public static class BSParam | |||
555 | 0.95f ), | 556 | 0.95f ), |
556 | new ParameterDefn<float>("AvatarAlwaysRunFactor", "Speed multiplier if avatar is set to always run", | 557 | new ParameterDefn<float>("AvatarAlwaysRunFactor", "Speed multiplier if avatar is set to always run", |
557 | 1.3f ), | 558 | 1.3f ), |
558 | new ParameterDefn<float>("AvatarDensity", "Density of an avatar. Changed on avatar recreation.", | 559 | // For historical reasons, density is reported * 100 |
559 | 3.5f) , | 560 | new ParameterDefn<float>("AvatarDensity", "Density of an avatar. Changed on avatar recreation. Scaled times 100.", |
561 | 3500f) , // 3.5 * 100 | ||
560 | new ParameterDefn<float>("AvatarRestitution", "Bouncyness. Changed on avatar recreation.", | 562 | new ParameterDefn<float>("AvatarRestitution", "Bouncyness. Changed on avatar recreation.", |
561 | 0f ), | 563 | 0f ), |
562 | new ParameterDefn<float>("AvatarCapsuleWidth", "The distance between the sides of the avatar capsule", | 564 | new ParameterDefn<float>("AvatarCapsuleWidth", "The distance between the sides of the avatar capsule", |
@@ -608,9 +610,8 @@ public static class BSParam | |||
608 | 0.0f ), | 610 | 0.0f ), |
609 | new ParameterDefn<float>("VehicleRestitution", "Bouncyness factor for vehicles (0.0 - 1.0)", | 611 | new ParameterDefn<float>("VehicleRestitution", "Bouncyness factor for vehicles (0.0 - 1.0)", |
610 | 0.0f ), | 612 | 0.0f ), |
611 | // Turn off fudge with DensityScaleFactor = 0.0001. Value used to be 0.2f; | ||
612 | new ParameterDefn<float>("VehicleGroundGravityFudge", "Factor to multiply gravity if a ground vehicle is probably on the ground (0.0 - 1.0)", | 613 | new ParameterDefn<float>("VehicleGroundGravityFudge", "Factor to multiply gravity if a ground vehicle is probably on the ground (0.0 - 1.0)", |
613 | 1.0f ), | 614 | 0.2f ), |
614 | new ParameterDefn<float>("VehicleAngularBankingTimescaleFudge", "Factor to multiple angular banking timescale. Tune to increase realism.", | 615 | new ParameterDefn<float>("VehicleAngularBankingTimescaleFudge", "Factor to multiple angular banking timescale. Tune to increase realism.", |
615 | 60.0f ), | 616 | 60.0f ), |
616 | new ParameterDefn<bool>("VehicleEnableLinearDeflection", "Turn on/off vehicle linear deflection effect", | 617 | new ParameterDefn<bool>("VehicleEnableLinearDeflection", "Turn on/off vehicle linear deflection effect", |