From 8c99f63239702bcdb8f1e0efa57efc91c98fc3d7 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 21 Dec 2012 10:00:03 -0800 Subject: 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. --- OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs') 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 PhysicsScene.TaintedObject("BSPrim.setVelocity", delegate() { // DetailLog("{0},BSPrim.SetVelocity,taint,vel={1}", LocalID, _velocity); - if (PhysBody.HasPhysicalBody) - BulletSimAPI.SetLinearVelocity2(PhysBody.ptr, _velocity); + ForceVelocity = _velocity; }); } } public override OMV.Vector3 ForceVelocity { get { return _velocity; } set { + PhysicsScene.AssertInTaintTime("BSPrim.ForceVelocity"); + _velocity = value; - BulletSimAPI.SetLinearVelocity2(PhysBody.ptr, _velocity); + if (PhysBody.HasPhysicalBody) + BulletSimAPI.SetLinearVelocity2(PhysBody.ptr, _velocity); } } public override OMV.Vector3 Torque { -- cgit v1.1