diff options
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs index 5d70ef7..e4e3edc 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | |||
@@ -564,17 +564,17 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
564 | // TODO: possibly set AngularFactor and LinearFactor for the type of vehicle. | 564 | // TODO: possibly set AngularFactor and LinearFactor for the type of vehicle. |
565 | // Maybe compute linear and angular factor and damping from params. | 565 | // Maybe compute linear and angular factor and damping from params. |
566 | float angularDamping = BSParam.VehicleAngularDamping; | 566 | float angularDamping = BSParam.VehicleAngularDamping; |
567 | BulletSimAPI.SetAngularDamping2(Prim.PhysBody.ptr, angularDamping); | 567 | PhysicsScene.PE.SetAngularDamping(Prim.PhysBody, angularDamping); |
568 | 568 | ||
569 | // Vehicles report collision events so we know when it's on the ground | 569 | // Vehicles report collision events so we know when it's on the ground |
570 | PhysicsScene.PE.AddToCollisionFlags(Prim.PhysBody, CollisionFlags.BS_VEHICLE_COLLISIONS); | 570 | PhysicsScene.PE.AddToCollisionFlags(Prim.PhysBody, CollisionFlags.BS_VEHICLE_COLLISIONS); |
571 | 571 | ||
572 | Vector3 localInertia = BulletSimAPI.CalculateLocalInertia2(Prim.PhysShape.ptr, m_vehicleMass); | 572 | Vector3 localInertia = PhysicsScene.PE.CalculateLocalInertia(Prim.PhysShape, m_vehicleMass); |
573 | BulletSimAPI.SetMassProps2(Prim.PhysBody.ptr, m_vehicleMass, localInertia); | 573 | PhysicsScene.PE.SetMassProps(Prim.PhysBody, m_vehicleMass, localInertia); |
574 | BulletSimAPI.UpdateInertiaTensor2(Prim.PhysBody.ptr); | 574 | PhysicsScene.PE.UpdateInertiaTensor(Prim.PhysBody); |
575 | 575 | ||
576 | Vector3 grav = PhysicsScene.DefaultGravity * (1f - Prim.Buoyancy); | 576 | Vector3 grav = PhysicsScene.DefaultGravity * (1f - Prim.Buoyancy); |
577 | BulletSimAPI.SetGravity2(Prim.PhysBody.ptr, grav); | 577 | PhysicsScene.PE.SetGravity(Prim.PhysBody, grav); |
578 | 578 | ||
579 | VDetailLog("{0},BSDynamics.Refresh,mass={1},frict={2},inert={3},aDamp={4}", | 579 | VDetailLog("{0},BSDynamics.Refresh,mass={1},frict={2},inert={3},aDamp={4}", |
580 | Prim.LocalID, m_vehicleMass, friction, localInertia, angularDamping); | 580 | Prim.LocalID, m_vehicleMass, friction, localInertia, angularDamping); |
@@ -669,7 +669,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
669 | 669 | ||
670 | // If we set one of the values (ie, the physics engine didn't do it) we must force | 670 | // If we set one of the values (ie, the physics engine didn't do it) we must force |
671 | // an UpdateProperties event to send the changes up to the simulator. | 671 | // an UpdateProperties event to send the changes up to the simulator. |
672 | BulletSimAPI.PushUpdate2(Prim.PhysBody.ptr); | 672 | PhysicsScene.PE.PushUpdate(Prim.PhysBody); |
673 | } | 673 | } |
674 | m_knownChanged = 0; | 674 | m_knownChanged = 0; |
675 | } | 675 | } |