diff options
author | Robert Adams | 2016-11-13 11:19:54 -0800 |
---|---|---|
committer | Robert Adams | 2016-11-13 11:19:54 -0800 |
commit | e13ff5a39233fd871e69f9ace23b4559cdfdcb7f (patch) | |
tree | a5e56577bb153a7dd481ee13571fabeb3e716b35 /OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs | |
parent | mantis 8055: fix default value of npc options (diff) | |
download | opensim-SC_OLD-e13ff5a39233fd871e69f9ace23b4559cdfdcb7f.zip opensim-SC_OLD-e13ff5a39233fd871e69f9ace23b4559cdfdcb7f.tar.gz opensim-SC_OLD-e13ff5a39233fd871e69f9ace23b4559cdfdcb7f.tar.bz2 opensim-SC_OLD-e13ff5a39233fd871e69f9ace23b4559cdfdcb7f.tar.xz |
BulletSim: update avatar velocity setting to the new TargetVelocity pattern.
Now PhysicsActor.Velocity.set and PhysicsActor.SetMomentum do the same thing
of setting the instantanious avatar velocity. PhysicsActor.TargetVelocity
sets a velocity target and the movement motor is used to accelerate the'
avatar to that velocity.
Diffstat (limited to 'OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs')
-rwxr-xr-x | OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs b/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs index 79ee00f..40c6b98 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSActorAvatarMove.cs | |||
@@ -108,10 +108,6 @@ public class BSActorAvatarMove : BSActor | |||
108 | { | 108 | { |
109 | if (m_velocityMotor != null) | 109 | if (m_velocityMotor != null) |
110 | { | 110 | { |
111 | // if (targ == OMV.Vector3.Zero) | ||
112 | // Util.PrintCallStack(); | ||
113 | // | ||
114 | // Console.WriteLine("SetVelocityAndTarget, {0} {1}", vel, targ); | ||
115 | m_velocityMotor.Reset(); | 111 | m_velocityMotor.Reset(); |
116 | m_velocityMotor.SetTarget(targ); | 112 | m_velocityMotor.SetTarget(targ); |
117 | m_velocityMotor.SetCurrent(vel); | 113 | m_velocityMotor.SetCurrent(vel); |
@@ -128,7 +124,7 @@ public class BSActorAvatarMove : BSActor | |||
128 | m_waitingForLowVelocityForStationary = true; | 124 | m_waitingForLowVelocityForStationary = true; |
129 | } | 125 | } |
130 | 126 | ||
131 | // If a movement motor has not been created, create one and start the hovering. | 127 | // If a movement motor has not been created, create one and start the movement |
132 | private void ActivateAvatarMove() | 128 | private void ActivateAvatarMove() |
133 | { | 129 | { |
134 | if (m_velocityMotor == null) | 130 | if (m_velocityMotor == null) |
@@ -161,7 +157,7 @@ public class BSActorAvatarMove : BSActor | |||
161 | } | 157 | } |
162 | } | 158 | } |
163 | 159 | ||
164 | // Called just before the simulation step. Update the vertical position for hoverness. | 160 | // Called just before the simulation step. |
165 | private void Mover(float timeStep) | 161 | private void Mover(float timeStep) |
166 | { | 162 | { |
167 | // Don't do movement while the object is selected. | 163 | // Don't do movement while the object is selected. |