aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
diff options
context:
space:
mode:
authorRobert Adams2011-08-05 11:01:27 -0700
committerMic Bowman2011-08-05 11:01:27 -0700
commit7640b5abf651e51ae2efd5f79f440768a595dbc9 (patch)
tree0b96cd6d2749f95888566f3e04f9798e04c21acd /OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
parentBulletSim: Update dlls (diff)
downloadopensim-SC_OLD-7640b5abf651e51ae2efd5f79f440768a595dbc9.zip
opensim-SC_OLD-7640b5abf651e51ae2efd5f79f440768a595dbc9.tar.gz
opensim-SC_OLD-7640b5abf651e51ae2efd5f79f440768a595dbc9.tar.bz2
opensim-SC_OLD-7640b5abf651e51ae2efd5f79f440768a595dbc9.tar.xz
BulletSim: Parameters settable from ini file. Linksets. Physical property value tuning
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index 82361ad..9f9ebcc 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -51,8 +51,6 @@ public class BSCharacter : PhysicsActor
51 private Vector3 _position; 51 private Vector3 _position;
52 private float _mass = 80f; 52 private float _mass = 80f;
53 public float _density = 60f; 53 public float _density = 60f;
54 public float CAPSULE_RADIUS = 0.37f;
55 public float CAPSULE_LENGTH = 2.140599f;
56 private Vector3 _force; 54 private Vector3 _force;
57 private Vector3 _velocity; 55 private Vector3 _velocity;
58 private Vector3 _torque; 56 private Vector3 _torque;
@@ -96,7 +94,8 @@ public class BSCharacter : PhysicsActor
96 _velocity = Vector3.Zero; 94 _velocity = Vector3.Zero;
97 _buoyancy = 0f; // characters return a buoyancy of zero 95 _buoyancy = 0f; // characters return a buoyancy of zero
98 _scale = new Vector3(1f, 1f, 1f); 96 _scale = new Vector3(1f, 1f, 1f);
99 float AVvolume = (float) (Math.PI*Math.Pow(CAPSULE_RADIUS, 2)*CAPSULE_LENGTH); 97 float AVvolume = (float) (Math.PI*Math.Pow(_scene.Params.avatarCapsuleRadius, 2)*_scene.Params.avatarCapsuleHeight);
98 _density = _scene.Params.avatarDensity;
100 _mass = _density*AVvolume; 99 _mass = _density*AVvolume;
101 100
102 ShapeData shapeData = new ShapeData(); 101 ShapeData shapeData = new ShapeData();
@@ -109,6 +108,8 @@ public class BSCharacter : PhysicsActor
109 shapeData.Mass = _mass; 108 shapeData.Mass = _mass;
110 shapeData.Buoyancy = isFlying ? 1f : 0f; 109 shapeData.Buoyancy = isFlying ? 1f : 0f;
111 shapeData.Static = ShapeData.numericFalse; 110 shapeData.Static = ShapeData.numericFalse;
111 shapeData.Friction = _scene.Params.avatarFriction;
112 shapeData.Restitution = _scene.Params.defaultRestitution;
112 113
113 // do actual create at taint time 114 // do actual create at taint time
114 _scene.TaintedObject(delegate() 115 _scene.TaintedObject(delegate()
@@ -395,9 +396,9 @@ public class BSCharacter : PhysicsActor
395 _acceleration = entprop.Acceleration; 396 _acceleration = entprop.Acceleration;
396 changed = true; 397 changed = true;
397 } 398 }
398 if (_rotationalVelocity != entprop.AngularVelocity) 399 if (_rotationalVelocity != entprop.RotationalVelocity)
399 { 400 {
400 _rotationalVelocity = entprop.AngularVelocity; 401 _rotationalVelocity = entprop.RotationalVelocity;
401 changed = true; 402 changed = true;
402 } 403 }
403 if (changed) 404 if (changed)