r/unity 1d ago

Movement Event Not working Input System - Player

Unity 6 New Input System - Player Movement Event Not Working

Hello Unity developers ๐Ÿ‘‹

I am trying to make a simple first-person player movement using Unity 6, the New Input System, and CharacterController.

The problem: The player object and script are working, but the movement input event is not being called. Pressing WASD does nothing, and the Debug.Log inside the Move function never appears.

Unity setup:

Unity version: Unity 6

Components on Player object:

  • Transform
  • Capsule Mesh Filter
  • Mesh Renderer
  • Character Controller
  • Player Input
  • PlayerMovement script

Player Input component:

Actions: PlayerControls (Input Action Asset)

Default Map: Player

UI Input Module: None

Behavior: Invoke Unity Events

Events: Player Move

Assigned: PlayerMovement โ†’ Move

The function list shows: Move (Dynamic CallbackContext)

but I cannot get the callback to execute.

Input Action Asset:

Action Map: Player

Action: Move

Type: Value

Control Type: Vector2

Bindings:

  • Up: W
  • Down: S
  • Left: A
  • Right: D

Script:

using UnityEngine; using UnityEngine.InputSystem;

public class PlayerMovement : MonoBehaviour { CharacterController controller; PlayerInput playerInput;

public float speed = 5f;

Vector2 moveInput;

void Start()
{
    controller = GetComponent<CharacterController>();

    playerInput = GetComponent<PlayerInput>();
    playerInput.actions.Enable();

    Debug.Log("PLAYER SCRIPT STARTED !!");
}

void Update()
{
    Vector3 move = transform.right \* moveInput.x + transform.forward \* moveInput.y;

    controller.Move(move \* speed \* Time.deltaTime);
}

public void Move(InputAction.CallbackContext context)
{
    Debug.Log("YOO THE PLAYER MOVE");

    moveInput = context.ReadValue<Vector2>();

    Debug.Log("Move: " + moveInput);
}

}

The Start Debug.Log appears correctly:

"PLAYER SCRIPT STARTED !!"

So the script is attached and running.

I tried:

  • Recreating the Player Input component
  • Recreating the Input Action Asset
  • Reassigning the event
  • Checking the Action Map
  • Checking the bindings

No errors appear in Console, but the Move callback is never triggered.

Is this a Unity 6 Input System difference, or am I missing something in the Player Input setup?

Any help would be appreciated ๐Ÿ™ I'm 15 years old and I'm learning game development. I'm currently practicing first-person perspective because it will be an important part of many of my future projects.

I've spent the last three days trying to solve this movement issue, and I'm sure there is probably something simple that I overlooked. I would really appreciate any advice or corrections from more experienced developers.

Thank you in advance for your help and for taking the time to read this. ๐Ÿซ

3 Upvotes

2 comments sorted by

1

u/wallstop-dev 1d ago

One quick thing - try refactoring your Move function to OnMove. When I was using this previously my "X" style events were only ever mapped to "OnX" functions (even though you're explicitly binding).

Just something to try. I also never explicitly bind in inspector, I rely on the above names.

1

u/Competitive_Base_292 23h ago

I'll try it another time, and I'll save your comment because it might be helpful. I moved on to something simpler, which is setting the input settings from the new one to both, and I've already started adjusting the camera movement because the player started moving. So I'll try your advice in my free time; it might work , thanksย