diff options
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs index 56342b8..117c878 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | |||
@@ -23,7 +23,7 @@ | |||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | * |
27 | 27 | ||
28 | /* RA: June 14, 2011. Copied from ODEDynamics.cs and converted to | 28 | /* RA: June 14, 2011. Copied from ODEDynamics.cs and converted to |
29 | * call the BulletSim system. | 29 | * call the BulletSim system. |
@@ -352,7 +352,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
352 | // m_bankingMix = 1; | 352 | // m_bankingMix = 1; |
353 | // m_bankingTimescale = 1; | 353 | // m_bankingTimescale = 1; |
354 | // m_referenceFrame = Quaternion.Identity; | 354 | // m_referenceFrame = Quaternion.Identity; |
355 | m_flags |= (VehicleFlag.NO_DEFLECTION_UP | 355 | m_flags |= (VehicleFlag.NO_DEFLECTION_UP |
356 | | VehicleFlag.LIMIT_ROLL_ONLY | 356 | | VehicleFlag.LIMIT_ROLL_ONLY |
357 | | VehicleFlag.LIMIT_MOTOR_UP); | 357 | | VehicleFlag.LIMIT_MOTOR_UP); |
358 | m_flags &= ~(VehicleFlag.HOVER_WATER_ONLY | VehicleFlag.HOVER_TERRAIN_ONLY | VehicleFlag.HOVER_GLOBAL_HEIGHT); | 358 | m_flags &= ~(VehicleFlag.HOVER_WATER_ONLY | VehicleFlag.HOVER_TERRAIN_ONLY | VehicleFlag.HOVER_GLOBAL_HEIGHT); |
@@ -382,7 +382,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
382 | // m_bankingTimescale = 1; | 382 | // m_bankingTimescale = 1; |
383 | // m_referenceFrame = Quaternion.Identity; | 383 | // m_referenceFrame = Quaternion.Identity; |
384 | m_flags &= ~(VehicleFlag.HOVER_TERRAIN_ONLY | 384 | m_flags &= ~(VehicleFlag.HOVER_TERRAIN_ONLY |
385 | | VehicleFlag.HOVER_GLOBAL_HEIGHT | 385 | | VehicleFlag.HOVER_GLOBAL_HEIGHT |
386 | | VehicleFlag.LIMIT_ROLL_ONLY | 386 | | VehicleFlag.LIMIT_ROLL_ONLY |
387 | | VehicleFlag.HOVER_UP_ONLY); | 387 | | VehicleFlag.HOVER_UP_ONLY); |
388 | m_flags |= (VehicleFlag.NO_DEFLECTION_UP | 388 | m_flags |= (VehicleFlag.NO_DEFLECTION_UP |
@@ -458,14 +458,15 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
458 | // Do any updating needed for a vehicle | 458 | // Do any updating needed for a vehicle |
459 | public void Refresh() | 459 | public void Refresh() |
460 | { | 460 | { |
461 | if (!IsActive) | 461 | if (!IsActive) |
462 | return; | 462 | return; |
463 | 463 | ||
464 | // Set the prim's inertia to zero. The vehicle code handles that and this | 464 | // Set the prim's inertia to zero. The vehicle code handles that and this |
465 | // removes the motion and torque actions introduced by Bullet. | 465 | // removes the motion and torque actions introduced by Bullet. |
466 | Vector3 inertia = Vector3.Zero; | 466 | Vector3 inertia = Vector3.Zero; |
467 | BulletSimAPI.SetMassProps2(Prim.BSBody.ptr, Prim.MassRaw, inertia); | 467 | // comment out for DEBUG test |
468 | BulletSimAPI.UpdateInertiaTensor2(Prim.BSBody.ptr); | 468 | // BulletSimAPI.SetMassProps2(Prim.BSBody.ptr, Prim.MassRaw, inertia); |
469 | // BulletSimAPI.UpdateInertiaTensor2(Prim.BSBody.ptr); | ||
469 | } | 470 | } |
470 | 471 | ||
471 | // One step of the vehicle properties for the next 'pTimestep' seconds. | 472 | // One step of the vehicle properties for the next 'pTimestep' seconds. |
@@ -791,7 +792,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
791 | 792 | ||
792 | // Sum velocities | 793 | // Sum velocities |
793 | m_lastAngularVelocity = m_angularMotorVelocity + vertattr; // + bank + deflection | 794 | m_lastAngularVelocity = m_angularMotorVelocity + vertattr; // + bank + deflection |
794 | 795 | ||
795 | if ((m_flags & (VehicleFlag.NO_DEFLECTION_UP)) != 0) | 796 | if ((m_flags & (VehicleFlag.NO_DEFLECTION_UP)) != 0) |
796 | { | 797 | { |
797 | m_lastAngularVelocity.X = 0; | 798 | m_lastAngularVelocity.X = 0; |