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
Assist/Standard Assist/Character Controllers and drag "First Person Controller" to scene.
Answer by raycosantana · Feb 03, 2013 at 03:22 PM
Hello
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!
Hello, I use Unity3 5.3.x, it seems there's no such "FPS Input Controller" and "$$anonymous$$ouse Look".
It's in the (free) "Standard Assets" package, you'll need to "import" that from the store, then, make sure that the scripts you want are ticked in the list
Answer by CubePhysics · Feb 03, 2013 at 02:22 PM
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.
Answer by lucas-olai · Mar 10, 2019 at 04:03 AM
I think this has been changed in later updated, and I found the FirstPersonController in https://assetstore.unity.com/packages/essentials/asset-packs/standard-assets-32351
Answer by connorwforman · Feb 07, 2017 at 06:51 PM
Asset Package: Assets/import package/character OR 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.