aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
diff options
context:
space:
mode:
authorRobert Adams2013-05-24 16:24:16 -0700
committerRobert Adams2013-05-24 16:24:16 -0700
commit5f1f5ea5ab5badf5944471fefe0a45f7b4f41b91 (patch)
tree1a3becadad77ead0ceb86a8535d0833e2a317ae2 /OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
parentBulletSim: properly set mesh hash key in use tracking structure. (diff)
downloadopensim-SC_OLD-5f1f5ea5ab5badf5944471fefe0a45f7b4f41b91.zip
opensim-SC_OLD-5f1f5ea5ab5badf5944471fefe0a45f7b4f41b91.tar.gz
opensim-SC_OLD-5f1f5ea5ab5badf5944471fefe0a45f7b4f41b91.tar.bz2
opensim-SC_OLD-5f1f5ea5ab5badf5944471fefe0a45f7b4f41b91.tar.xz
BulletSim: add VehicleInertiaFactor to allow modifying inertia.
Another parameter for vehicle operation tuning. Default to <1,1,1> which means nothing is different under normal use.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
index c16b7d3..311cf4f 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
@@ -617,7 +617,8 @@ namespace OpenSim.Region.Physics.BulletSPlugin
617 // Vehicles report collision events so we know when it's on the ground 617 // Vehicles report collision events so we know when it's on the ground
618 m_physicsScene.PE.AddToCollisionFlags(ControllingPrim.PhysBody, CollisionFlags.BS_VEHICLE_COLLISIONS); 618 m_physicsScene.PE.AddToCollisionFlags(ControllingPrim.PhysBody, CollisionFlags.BS_VEHICLE_COLLISIONS);
619 619
620 ControllingPrim.Inertia = m_physicsScene.PE.CalculateLocalInertia(ControllingPrim.PhysShape.physShapeInfo, m_vehicleMass); 620 Vector3 inertia = m_physicsScene.PE.CalculateLocalInertia(ControllingPrim.PhysShape.physShapeInfo, m_vehicleMass);
621 ControllingPrim.Inertia = inertia * BSParam.VehicleInertiaFactor;
621 m_physicsScene.PE.SetMassProps(ControllingPrim.PhysBody, m_vehicleMass, ControllingPrim.Inertia); 622 m_physicsScene.PE.SetMassProps(ControllingPrim.PhysBody, m_vehicleMass, ControllingPrim.Inertia);
622 m_physicsScene.PE.UpdateInertiaTensor(ControllingPrim.PhysBody); 623 m_physicsScene.PE.UpdateInertiaTensor(ControllingPrim.PhysBody);
623 624