Camera follows rotation. How can I fix it?

So I’m a real beginner in Unity3d. I want to make a snowboard game and to simulate a trick I want to play an animation when I hit “F” while I’m in air.
So I made an animation where my player (a cube) rotates 360° and also a script which looks like this:
if (jumpCount == true && Input.GetButton(“Trick1”)){
animation.CrossFade (“trick”);
}

So this works but I have one problem: My camera (which is a child of my player) also rotates and I don’t want this. How can I fix it?
Sorry for my bad english…

you can tell the camera in an update fuction

transform.rotation = Quaternion.Euler(Vector3.zero);

that way your camera wont rotate at all

This worked! :slight_smile:
(the script didn’t unfortunately)

“or you can make the camera not a child
of the charater and jsut have it
follow the character instead.”

This worked! :slight_smile:
(the script didn’t unfortunately)

You can create a new empty object: The player controller (just a point).

You make your player child of the player controller and also the camera.
Now you can aim the camera at the player controller (point) and move and rotate your player without the camera following it’s rotation or translation.

Then if you want the camera to follow the translation of you character you just make the translations apply on your player conrtoller insted of the player itself.

I hope it helps :slight_smile: