Does anyone know how to move my camera with the mouse? im trying to make a first-person game, but i cant find out how to look around. Any help?
Thanks!
Well, what have you tried? Why couldn’t you find out? There are many, many resources already out there:
-
If you read the method reference, you’ll see that you check input with Input.mousePosition (or Input.GetAxis, for an axis mapped to the mouse in Input Manager). Then you move the camera by setting its transform.rotation.
-
Or if you download one of the sample assets that has a FP controller, such as Bootcamp, you’ll be able to study the source code there.
-
Or you import the built-in FP controller from Assets → Import Package → Character Controller → MouseLook.js
-
Or you use Google or Youtube and follow one of the 2,370,000 hits for First Person look controllers there.