From 613f516007f8f1c0cd978fec7ec40f579af35d65 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 4 Jan 2013 16:45:34 -0800 Subject: [PATCH] BulletSim: convert avatar movement from a force to an impulse. Shouldn't change functionality but removes an oddity in computing the force. --- OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index 103d8fc1db..c215e3a2db 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs @@ -214,7 +214,7 @@ public sealed class BSCharacter : BSPhysObject } // 'stepVelocity' is now the speed we'd like the avatar to move in. Turn that into an instantanous force. - OMV.Vector3 moveForce = (stepVelocity - _velocity) * Mass / PhysicsScene.LastTimeStep; + OMV.Vector3 moveForce = (stepVelocity - _velocity) * Mass; /* // If moveForce is very small, zero things so we don't keep sending microscopic updates to the user @@ -231,7 +231,7 @@ public sealed class BSCharacter : BSPhysObject } */ // DetailLog("{0},BSCharacter.MoveMotor,move,stepVel={1},vel={2},mass={3},moveForce={4}", LocalID, stepVelocity, _velocity, Mass, moveForce); - AddForce(moveForce, false, true); + PhysicsScene.PE.ApplyCentralImpulse(PhysBody, moveForce); }); }