how to view char from side at all times with 3rd person controller

Hi. I already posted this question yesterday on the forum, but it seems gone :slight_smile:

I was testing out the 3rd person camera in unity standard assets and I like how it follows the player.
However i am building a 2.5d platformer and have certain blocks in a different axis.
Reason why I use this camera is, because part of the difficulty of the game will be to stay on the platform. And thus the player can move in all directions on that specific platform.

I tried to rotate the char 90degrees in editor mode, but once i press play the char is viewed from the back, after spending some time on the code that comes with the controller, i can’t seem to find out where or what causes the camera to view the char from the back.

Here are a few screenshots to elaborate the situation.
First situation is a standard platformer and I would love to have the camera view the char from the side. as you can see in the top view, the other platform is in a different direction.

[28391-screenshot+2014-06-27+15.08.23.png|28391]

Second screenshot would be when the player get to the new direction.
I could make triggers to switch cameras but that seems not the way… Esp when I notice that the standard 3rd person controller/camera that ships with unity does what i want, except for the back view :slight_smile:

[28392-screenshot+2014-06-27+15.09.14.png|28392]

am no sure if this is hardcore or noob… I am quite new to unity so I might oversee some basic things.
Thank you for shedding some light and/or some pointers :slight_smile:
My best regards

—V

That’s an extremely basic thing, the fact that you have trouble with that means you should start a bit simpler.

Try creating a new scene with a box. Put a script on it that has something like this in the Update method:

Camera.main.camera.transform.position.y = transform.position.y;
Camera.main.camera.transform.position.x = transform.position.x;
Camera.main.camera.transform.LookAt(transform.position);

You can mess around with x/y/z values to get the angle you want. You should probably look up the basic tutorials online too. Goodluck!