transform.forward and trasnform.Rotate() out of sync (C#)

Trying to make a top down game. left and right rotate the object and up and down move it forward and backward. I’m getting ver unexpected behavior with the code below

using UnityEngine;
using System.Collections;

public class TopDown_Movement : MonoBehaviour {
        public float moveSpeed = 15f;
        public float rotSpeed = 15f;

	void Update () {
                float x = Input.GetAxis("Horizontal") * Time.deltaTime * rotSpeed;
                float y = Input.GetAxis("Vertical") * Time.deltaTime * moveSpeed;

                transform.Rotate(0, x, 0);
                transform.Translate(transform.forward * y);
	}
}

If the object is facing north: it goes north.
If the object is facing east: it goes south
If the object is facing south: it goes north
If the object is facing northeast: it goes east.

Essentially, the visible rotation is exactly double the angle that corresponds to transform.forward. Any idea why this might be?

P.S. What is delta time in units of? Seconds?

replace transform.forward with Vector3.forward

deltaTime in seconds

Thanks times 2 James! It makes sense now that I think about it. do rigidbody.AddForce() and addTorque() work relative to the object’s coordinate space too? or will those forces be applied relative to the global coordinate space?

No, there is a AddRelativeForce and AddRelativeTorque for rigidbodies local space forces.