[Mobile]Object face direction he's moving in (rotation?)

Hello, I’m totally new to Unity, and I’m trying to make a really simple top down game, but I’m already having lots of problems with the movement.
Here what I have:

void Update () {

if (Input.touchCount == 1 && Input.GetTouch (0).phase == TouchPhase.Moved) {
Touch touch = Input.GetTouch (0);
transform.Translate(touch.deltaPosition.x/Screen.width * playerspeed,touch.deltaPosition.y/Screen.height * playerspeed,0);}

With this, I can move the character, but what I want is to make the player face the direction he’s moving in, like when he turn left, he look left, etc…
I already searched on google a lot but didn’t found anything that worked, I tried Vector3.forward, transform.rotation (with Quartenion) but none worked.
I also tried making the movement with the accelerometer, but didn’t work either. I’m using the Unity Remote 4 to test it. I have no idea how to make it,
so if someone could help me I appreciate a lot.
Thanks in advance

You can use something like

float heading = Mathf.Atan2(touch.deltaPosition.x, touch.deltaPosition.y);
transform.localEulerAngles = new Vector3(0, heading, 0);

I tried doing this but nothing happens. I’m trying to make some changes on your code, but it just make more wonkythe movement

Ohh from meory I think that Atan2 returns the angle in radians but the Euler angles are in degrees. Maybe add something like:

float heading = Mathf.Atan2(touch.deltaPosition.x, touch.deltaPosition.y);
transform.localEulerAngles = new Vector3(0, Mathf.Rad2Deg * heading, 0);

Also, after you rotate, you might need to change the translate code to transform.Translate(…, Space.World) so that it doesn’t try to move relative to the characters orientation.

It’s starting to get better, but now it looks like it’s moving and rotating in z, but on all code z is always set to 0 and on preferences,it’s selected to 2D.
Thanks in advance

I’ll try that

When trying to add Space.World I receive the message:
error CS1502: The best overloaded method match for `UnityEngine.Transform.Translate(float, float, float)’ has some invalid arguments