How to make a first-person player for my game (like slender or the island demo)

im COMPLETELY new to programming and game making and am learning from youtube etc
i would love it if someone could tell me how to:

  1. attach the camera to an object (like in the island demo, which i saw on youtube, i dont have it on my laptop)
  2. what is the javascript for these basic controls like jump, move the mouse to look around, walk around etc…

please help me

There is a Package for this that comes with Unity just go to Assets/import package/character controller and their is a first and third person controller in their and you can edit it.


For a FPS you dont need to code anything, Unity already has some good scripts for this. You need to import them into your project Assets/import package/Character controllers.

To use them first we need to add a character controller script to our camera, Like this:

You can now move the camera with the WASD keys and Jump with the Space bar. But you cant look with the mouse, for that we need to add another script to our camera like this:


Now you can move and look with the mouse, however you need to create a terrain otherwise your character will fall forever when you hit play. I cant upload more images since the maximun allowed is two but this pretty simple go to Terrain and click on Create Terrain.

Good luck!

I think this has been changed in later updated, and I found the FirstPersonController in Standard Assets 2018.4 | Check out Starter Assets: First Person & Third Person | Asset Packs | Unity Asset Store

Asset Package: Assets/import package/character
Attach the camera to a rolling ball, and the player won’t see the ball, so it works!

When making the area, make sure you add a roof, and make it big. Add lighting while in the game-making part, so you can see well, and delete it when done. If the game is supposed to be well lit, then leave it that way.

That is just for movement, sorry for no mouse-look function.