ive followed a couple tutorials to get movement down in a project and A and D always do the opposite movement input to what is selected. i dont know if its the code or something in the engine.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
[RequireComponent(typeof(CharacterController))]
public class NewBehaviourScript : MonoBehaviour
{
private Vector2 _input;
private CharacterController _characterController;
private Vector3 _direction;
[SerializeField] private float speed;
private void Awake()
{
_characterController = GetComponent<CharacterController>();
}
private void Update()
{
_characterController.Move(_direction * speed * Time.deltaTime);
}
public void move(InputAction.CallbackContext context)
{
_input = context.ReadValue<Vector2>();
_direction = new Vector3(-_input.x, y:0.0f, z:_input.y);
}
}