Hi I'm having trouble with my camera I'm making a 2.5D game and i cant get the camera to follow the player because if i attach the camera to the player the camera follows the movement but flips over the other side how can I script this?
Answer by AngryOldMan
Mar 19, 2011 at 10:56 PM
parent the camera to an empty game object with a rigidbody and freeze rotation selected (under the rigidbody's inspector properties) parent this to the player.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
No one has followed this question yet.
Unity 2D camera and lighting issues
2D Platformer Demo Camera Follow script doesn't follow player
How to use Lerp?
Camera problems in SideScrolling
Unassigned Reference Exception error