- Home /
My camera flip with the player, help
My camera flip with the player because I have a Flip script on my player and the camera is the son of the player and is doing flip along with the player, is there a way to solve this and make only my player flip and not the camera?
Answer by Earthshine · May 25, 2021 at 05:29 PM
Child object always inherits the parent's movement/rotation in unity.
Make the camera a separate object and make a script for it.
Make camera set it's transform.position.x and transform.position.y to those of the player in Update() function. (If your project is a 2d platformer or a sidescroller. Script logic could be different otherwise)
Alternatively learn how to use Cinemachine tool. It's quite easy to make it do all you could want from a camera and there are some great tutorials for it online.
Your answer
Follow this Question
Related Questions
Camera lagging and flipped 0 Answers
Lock character's LocalScale during Idle animation 1 Answer
Move the camera in 2D when target reaches bounds. Is there a better way? 0 Answers
Changing transform.localScale of a prefab in the script not working. Help pls! 1 Answer
Is it possible to not allow the in-game cursor through certain sprites? 1 Answer