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 user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
No one has followed this question yet.
How can I get the lowest position of objects that are visible by the camera?
2d camera along fixed path
ScreenToWorldPoint not accurate
2D Platformer Demo Camera Follow script doesn't follow player
How to use Lerp?