This is what I have:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class PlayerController : MonoBehaviour
{
private CharacterController controller;
private Vector3 moveVector;
public float moveSpeed;
public float jumpForce;
private void Awake()
{
controller = GetComponent<CharacterController>();
}
private void Update()
{
controller.Move(moveVector);
}
private void OnMove(InputValue value)
{
moveVector = new Vector3(value.Get<Vector2>().x, 0f, value.Get<Vector2>().y) * moveSpeed * Time.deltaTime;
}
}
This results in inconsistent movement speed and sometimes not stopping when the movement key is released. I checked the inputs values and they are coming in fine so I’m not sure where/what the problem is.