Thanks for helping! I tried implementing you code in to mine, but it still didn’t work since input was still returning -1 and that got multiplied by 10 and still made my ship always zoom to the left.
Here is my code if that helps
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerController : MonoBehaviour
{
[SerializeField] float speed = 10;
[SerializeField] float rotationSpeed = 5;
void Update()
{
float translation = Input.GetAxis("Horizontal") * speed;
float rotation = Input.GetAxis("Vertical") * rotationSpeed;
Debug.Log(translation);
float xOffset = translation * Time.deltaTime;
float newXPos = transform.localPosition.x + xOffset;
transform. localPosition = new Vector3(newXPos,
transform.localPosition.y,
transform.localPosition.z);
}
}
Thank you!