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 post good questions and use the site effectively 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.
Improve smooth 2d side scroller camera to look more fluent
Restricting camera to within areas. 2D Adventure Platformer
2d camera movement
How to make camera position relative to a specific target.
How to get camera to follow player 2d