Yes. I’ve set StateMachine to log when switching states and PlayerBaseState to log motion and (motion + stateMachine.ForceReceiver.Movement).
SwitchState:
public void SwitchState(State newState)
{
currentState?.Exit();
currentState = newState;
currentState?.Enter();
Debug.Log("<color=green>Switching to " + currentState?.ToString() + "</color>");
}
PlayerBaseState:
protected void Move(Vector3 motion, float deltaTime)
{
Debug.Log("<color=yellow>Motion " + motion.ToString() + "</color>");
stateMachine.Controller.Move((motion + stateMachine.ForceReceiver.Movement) * deltaTime);
Debug.Log("<color=yellow>Motion plus ForceReceiver.Movement " + (motion + stateMachine.ForceReceiver.Movement).ToString() + "</color>");
}
And here’s the output:
<color=yellow>Motion (2.65, 0.00, -5.38)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFreeLookState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFreeLookState.cs:29)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (2.65, -0.20, -5.38)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFreeLookState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFreeLookState.cs:29)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (2.66, 0.00, -5.38)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFreeLookState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFreeLookState.cs:29)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (2.66, -0.18, -5.38)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFreeLookState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFreeLookState.cs:29)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (2.66, 0.00, -5.38)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFreeLookState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFreeLookState.cs:29)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (2.66, -0.19, -5.38)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFreeLookState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFreeLookState.cs:29)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (2.66, 0.00, -5.38)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFreeLookState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFreeLookState.cs:29)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (2.66, -0.23, -5.38)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFreeLookState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFreeLookState.cs:29)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (2.66, 0.00, -5.38)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFreeLookState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFreeLookState.cs:29)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (2.66, -0.19, -5.38)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFreeLookState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFreeLookState.cs:29)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=green>Switching to PlayerJumpingState</color>
UnityEngine.Debug:Log (object)
StateMachine:SwitchState (State) (at Assets/Scripts/StateMachines/StateMachine.cs:20)
PlayerFreeLookState:OnJump () (at Assets/Scripts/StateMachines/Player/PlayerFreeLookState.cs:56)
InputReader:OnJump (UnityEngine.InputSystem.InputAction/CallbackContext) (at Assets/Scripts/InputReader.cs:38)
UnityEngine.InputSystem.LowLevel.NativeInputRuntime/<>c__DisplayClass7_0:<set_onUpdate>b__0 (UnityEngineInternal.Input.NativeInputUpdateType,UnityEngineInternal.Input.NativeInputEventBuffer*)
UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate (UnityEngineInternal.Input.NativeInputUpdateType,intptr)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 3.56, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 3.34, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 3.16, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 2.97, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 2.79, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 2.60, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 2.42, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 2.23, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 1.73, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 1.52, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 1.34, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 1.15, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 0.95, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 0.76, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 0.57, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 0.38, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, 0.19, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -0.13, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:30)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=green>Switching to PlayerFallingState</color>
UnityEngine.Debug:Log (object)
StateMachine:SwitchState (State) (at Assets/Scripts/StateMachines/StateMachine.cs:20)
PlayerJumpingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerJumpingState.cs:34)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -0.39, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -0.65, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -0.85, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -1.05, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -1.25, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -1.46, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -1.67, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -1.88, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -2.17, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -2.38, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -2.58, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -2.78, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -3.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -3.21, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -3.41, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (0.03, 0.00, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion plus ForceReceiver.Movement (0.03, -3.60, 0.01)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:24)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:28)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=green>Switching to PlayerFreeLookState</color>
UnityEngine.Debug:Log (object)
StateMachine:SwitchState (State) (at Assets/Scripts/StateMachines/StateMachine.cs:20)
PlayerBaseState:ReturnToLocomotion () (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:47)
PlayerFallingState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFallingState.cs:32)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
<color=yellow>Motion (2.58, 0.00, -5.42)</color>
UnityEngine.Debug:Log (object)
PlayerBaseState:Move (UnityEngine.Vector3,single) (at Assets/Scripts/StateMachines/Player/PlayerBaseState.cs:22)
PlayerFreeLookState:Tick (single) (at Assets/Scripts/StateMachines/Player/PlayerFreeLookState.cs:29)
StateMachine:Update () (at Assets/Scripts/StateMachines/StateMachine.cs:12)
You can see the character is moving before entering the jump state, but motion.x and motion.z go near zero when switching. It starts moving again immediately after returning to freelook. Is this normal behaviour?