- Home /
Issue solved. App working as expected.
How to attach camera to object
I checked the internet and this forum for recent codes but the replies are a few years back or for unity 5.x. I have put on hold some tutorials in the udemy website because I'm still new to the unity app. In the process of learning, I found some not very new tutorials within unity itself. I am currently in this link which can also be found in the youtube link. See below: https://learn.unity.com/tutorial/camera-and-play-area?projectId=5c51479fedbc2a001fd5bb9f#5c7f8529edbc2a002053b78c
https://www.youtube.com/watch?v=Xcm5H2J95iI&feature=youtu.be&t=289
My issue is the codes for the camera controller is outdated so that it cannot focus like how the tutorial shows but goes extremely near the ball following the codes. However, when I disable by commenting the codes, the camera stays stuck where it is and just doesn't move when the ball rolls round the board. Any help to complete this section of the tutorial would be appreciated. If you know the codes, or any link to useful tutorials, that would be really great so I can learn to code on my own.
Answer by sacredgeometry · Aug 19, 2019 at 02:02 PM
Drag and drop the camera object onto your GameObject in the scene hierarchy view.
Answer by Beginner_at_Unity · Aug 19, 2019 at 02:41 PM
I tried that. The result is not what I expected : the entire screen rotates. I just want the camera to go nearer the object. See my screenshot.