Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

First-person view in Unity

A topic by NullXer created Sep 24, 2019 Views: 368 Replies: 2
Viewing posts 1 to 3

How do I make the mouse centered in Unity and how do I make it so that you rotate the camera by moving the mouse?

You need to create a Character Controller, and a script that controls the movements. There are some stuff on Youtube as well

(+2)

If you want to make your own character controller, you can lock the cursor to the game (and make it invisible) by using Cursor.lockState = CursorLockState.Locked, then use Input.GetAxis("MouseX") for horizontal movement, which rotates the camera. Then do the same for vertical, if needed :)