- Home /
How can I move my Main Camera in a 3D game? C# Please.
I keep finding scripts on how to use a Player with your Main Camera as a child, but none of them work. So, I was wondering if there was a way to move the Camera Itself, instead of attaching it to a Player. This is all supposed to be for camera movement In-Game, not in the editor.
I suspect you have some kind of script being used to control your character, via user input. If you attach this script to your camera object, ins$$anonymous$$d of the character object, I would expect it to control the camera in the same way as the character. (Note: This is not ALWAYS the case, particularly if the character controller script uses mass, force and physics stuff to move it around, as opposed to simply adjusting the position.)
an old unity script i have does that i will try to find it for you
So the solution I found was to add the Character Controller to the main camera, and to then add the First Person Controller Script from the Characters Asset Package to the main camera as well.
Answer by Killerbro389 · Jun 16, 2017 at 05:53 PM
I don't get your question. Do you mean move it with physics, or what 'cause that's confusing me.
Answer by Lukedm · Jun 16, 2017 at 09:56 PM
Import the character asset, then set the details you want, and if you want to add a model to it, put the camera at the head and put the model into te character prefab.