diff options
author | Robert Adams | 2012-12-21 10:00:03 -0800 |
---|---|---|
committer | Robert Adams | 2012-12-21 10:00:03 -0800 |
commit | 8c99f63239702bcdb8f1e0efa57efc91c98fc3d7 (patch) | |
tree | ea049bbeb4f40060a8f8595f0a872e5a1ecd1cb7 /OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |
parent | BulletSim: Better detail logging of VMotor actions. (diff) | |
download | opensim-SC_OLD-8c99f63239702bcdb8f1e0efa57efc91c98fc3d7.zip opensim-SC_OLD-8c99f63239702bcdb8f1e0efa57efc91c98fc3d7.tar.gz opensim-SC_OLD-8c99f63239702bcdb8f1e0efa57efc91c98fc3d7.tar.bz2 opensim-SC_OLD-8c99f63239702bcdb8f1e0efa57efc91c98fc3d7.tar.xz |
BulletSim: avatar movement smoothed with motor that modifies avatar velocity to target velocity. Fails in incorporating physical world effects (gravity) so avatar doesn't fly correctly.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index 1c6f946..68a0db6 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |||
@@ -532,16 +532,18 @@ public sealed class BSPrim : BSPhysObject | |||
532 | PhysicsScene.TaintedObject("BSPrim.setVelocity", delegate() | 532 | PhysicsScene.TaintedObject("BSPrim.setVelocity", delegate() |
533 | { | 533 | { |
534 | // DetailLog("{0},BSPrim.SetVelocity,taint,vel={1}", LocalID, _velocity); | 534 | // DetailLog("{0},BSPrim.SetVelocity,taint,vel={1}", LocalID, _velocity); |
535 | if (PhysBody.HasPhysicalBody) | 535 | ForceVelocity = _velocity; |
536 | BulletSimAPI.SetLinearVelocity2(PhysBody.ptr, _velocity); | ||
537 | }); | 536 | }); |
538 | } | 537 | } |
539 | } | 538 | } |
540 | public override OMV.Vector3 ForceVelocity { | 539 | public override OMV.Vector3 ForceVelocity { |
541 | get { return _velocity; } | 540 | get { return _velocity; } |
542 | set { | 541 | set { |
542 | PhysicsScene.AssertInTaintTime("BSPrim.ForceVelocity"); | ||
543 | |||
543 | _velocity = value; | 544 | _velocity = value; |
544 | BulletSimAPI.SetLinearVelocity2(PhysBody.ptr, _velocity); | 545 | if (PhysBody.HasPhysicalBody) |
546 | BulletSimAPI.SetLinearVelocity2(PhysBody.ptr, _velocity); | ||
545 | } | 547 | } |
546 | } | 548 | } |
547 | public override OMV.Vector3 Torque { | 549 | public override OMV.Vector3 Torque { |