Why does the object go off the center if I move the camera up or down?

Hi! This might be a silly question but I’m really new to unity. What I want to do is to fix an object always in the camera view. I watched some tutorials and all of them said to make the object a child of the camera. But when I try it, the object goes off the center if I look up or down. What is the problem here?


Are you sure it is child of camera?Maybe you change local position of that object?

2 Likes

Thanks for replying! It is the child of the camera. And I didn’t change anything of that cube.

I will create a new object and do the same thing. Maybe there is something messed up in the project setting.

You can try it in scene before you write it to script and then you see what “numbers you need to adjust” , try Unity Learn tutorials it is very good for basics like this.

Thanks! It turned out the problem is in my MouseLook script. I used another one then it’s fixed. I will go through the tutorial that you recommended.