Hello, was wondering if anyone had any insight on how to rotate the ship relative to the pointers position? I have found Transform.LookAt() but cant figure out how to implement it without breaking everything. I’ve reversed all the rotating code back to its default.
public void respondToRotateInput()
{
float rotationSpeed = rcsThrust * Time.deltaTime;
if (Input.GetKey(KeyCode.A))
{
rigidBody.freezeRotation = true;
transform.Rotate(Vector3.forward * rotationSpeed);
rigidBody.freezeRotation = false;
}
else if (Input.GetKey(KeyCode.D))
{
rigidBody.freezeRotation = true;
transform.Rotate(-Vector3.forward * rotationSpeed);
rigidBody.freezeRotation = false;
}
}