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.
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).
To help users post good questions and use the site effectively we have posted a user guide. Please check it out.
Answers and Comments
No one has followed this question yet.
Platformer game level rotation
How can i prevent the camera from goin down the y axis (othographic Doodle jump camera)
How to keep player in screen?
The main camera pans up when I press play.Please help.
How can I get the lowest position of objects that are visible by the camera?