aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
index a369c1f..5c531fc 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
@@ -583,8 +583,6 @@ namespace OpenSim.Region.Physics.BulletSPlugin
583 583
584 // Some of the properties of this prim may have changed. 584 // Some of the properties of this prim may have changed.
585 // Do any updating needed for a vehicle 585 // Do any updating needed for a vehicle
586 Vector3 m_physicsLinearFactor = new Vector3(0.2f, 0.2f, 0.2f); // DEBUG DEBUG
587 Vector3 m_physicsAngularFactor = new Vector3(0.2f, 0.2f, 0.2f); // DEBUG DEBUG
588 public void Refresh() 586 public void Refresh()
589 { 587 {
590 if (IsActive) 588 if (IsActive)
@@ -593,16 +591,16 @@ namespace OpenSim.Region.Physics.BulletSPlugin
593 m_vehicleMass = Prim.Linkset.LinksetMass; 591 m_vehicleMass = Prim.Linkset.LinksetMass;
594 592
595 // Friction affects are handled by this vehicle code 593 // Friction affects are handled by this vehicle code
596 float friction = 0f; 594 PhysicsScene.PE.SetFriction(Prim.PhysBody, BSParam.VehicleFriction);
597 PhysicsScene.PE.SetFriction(Prim.PhysBody, friction); 595 PhysicsScene.PE.SetRestitution(Prim.PhysBody, BSParam.VehicleRestitution);
598 596
599 // Moderate angular movement introduced by Bullet. 597 // Moderate angular movement introduced by Bullet.
600 // TODO: possibly set AngularFactor and LinearFactor for the type of vehicle. 598 // TODO: possibly set AngularFactor and LinearFactor for the type of vehicle.
601 // Maybe compute linear and angular factor and damping from params. 599 // Maybe compute linear and angular factor and damping from params.
602 float angularDamping = BSParam.VehicleAngularDamping; 600 float angularDamping = BSParam.VehicleAngularDamping;
603 PhysicsScene.PE.SetAngularDamping(Prim.PhysBody, angularDamping); 601 PhysicsScene.PE.SetAngularDamping(Prim.PhysBody, angularDamping);
604 PhysicsScene.PE.SetLinearFactor(Prim.PhysBody, m_physicsLinearFactor); // DEBUG DEBUG 602 PhysicsScene.PE.SetLinearFactor(Prim.PhysBody, BSParam.VehicleLinearFactorV);
605 PhysicsScene.PE.SetAngularFactorV(Prim.PhysBody, m_physicsAngularFactor); // DEBUG DEBUG 603 PhysicsScene.PE.SetAngularFactorV(Prim.PhysBody, BSParam.VehicleAngularFactorV);
606 604
607 // Vehicles report collision events so we know when it's on the ground 605 // Vehicles report collision events so we know when it's on the ground
608 PhysicsScene.PE.AddToCollisionFlags(Prim.PhysBody, CollisionFlags.BS_VEHICLE_COLLISIONS); 606 PhysicsScene.PE.AddToCollisionFlags(Prim.PhysBody, CollisionFlags.BS_VEHICLE_COLLISIONS);
@@ -618,7 +616,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
618 PhysicsScene.PE.SetGravity(Prim.PhysBody, Vector3.Zero); 616 PhysicsScene.PE.SetGravity(Prim.PhysBody, Vector3.Zero);
619 617
620 VDetailLog("{0},BSDynamics.Refresh,mass={1},frict={2},inert={3},aDamp={4},grav={5}", 618 VDetailLog("{0},BSDynamics.Refresh,mass={1},frict={2},inert={3},aDamp={4},grav={5}",
621 Prim.LocalID, m_vehicleMass, friction, Prim.Inertia, angularDamping, m_VehicleGravity); 619 Prim.LocalID, m_vehicleMass, Prim.Inertia, angularDamping, m_VehicleGravity);
622 } 620 }
623 else 621 else
624 { 622 {