mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Fix ground sit autopilot
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
@@ -169,6 +170,7 @@ TrySetMovementAnimation("STAND");
|
||||
#region Inputs
|
||||
|
||||
AgentManager.ControlFlags controlFlags = (AgentManager.ControlFlags)m_scenePresence.AgentControlFlags;
|
||||
// m_log.DebugFormat("[ANIM]: Control flags: {0}", controlFlags);
|
||||
PhysicsActor actor = m_scenePresence.PhysicsActor;
|
||||
|
||||
// Create forward and left vectors from the current avatar rotation
|
||||
@@ -190,12 +192,12 @@ TrySetMovementAnimation("STAND");
|
||||
|
||||
// Direction in which the avatar is trying to move
|
||||
Vector3 move = Vector3.Zero;
|
||||
if (heldForward) { move.X += fwd.X; move.Y += fwd.Y; }
|
||||
if (heldBack) { move.X -= fwd.X; move.Y -= fwd.Y; }
|
||||
if (heldLeft) { move.X += left.X; move.Y += left.Y; }
|
||||
if (heldRight) { move.X -= left.X; move.Y -= left.Y; }
|
||||
if (heldUp) { move.Z += 1; }
|
||||
if (heldDown) { move.Z -= 1; }
|
||||
if (heldForward) { move.X += fwd.X; move.Y += fwd.Y; }
|
||||
|
||||
// Is the avatar trying to move?
|
||||
// bool moving = (move != Vector3.Zero);
|
||||
|
||||
Reference in New Issue
Block a user