I’m starting the Laser Defender project and when using Input.GetAxis(“Horizontal”) and the vertical equivalent I get no movement via mouse movement. The keyboard keys work but I get nothing from the mouse movement. I’ve checked the code many times but it seems right. Please help!
private void Move()
{
var deltaX = Input.GetAxis("Horizontal") * Time.deltaTime * moveSpeed;
var deltaY = Input.GetAxis("Vertical") * Time.deltaTime * moveSpeed;
var newXPos = transform.position.x + deltaX;
var newYPos = transform.position.y + deltaY;
transform.position = new Vector2(newXPos, newYPos);
}