![realistic fps prefab gun moves to z position slowly realistic fps prefab gun moves to z position slowly](https://koenig-media.raywenderlich.com/uploads/2016/12/pistolspr2.gif)
I always dock this next to the hierarchy, so I'll keep that tradition alive. Open up the variables window by pressing Window > Variables. Name it something like CharacterController. I like to stay organized so I'll create a new folder called Scripts, in that folder I'll make a new folder called Player and save our macro in there. We'll create a new macro by pressing New in the flow machine and save that macro somewhere safe.
![realistic fps prefab gun moves to z position slowly realistic fps prefab gun moves to z position slowly](https://i1.rgstatic.net/publication/266675400_First_Person_Shooter_-_The_Subjective_Cyberspace/links/54370cc00cf2643ab9888efd/largepreview.png)
Search for Flow Machine, then select it in the menu. Select the player in the hierarchy and then press Add Component in the inspector. Right, now that everything is set up, let's start working on our code! Now our scene should look something like this: Do this by right-clicking in the hierarchy and select 3D Object > Plane. So we'll create a simple plane to work as our floor. Lastly there needs to be some sort of environment to walk around in so that we don't fall into the never-ending void below us. A Y value of something like 0.5 usually works but you use whatever value you like. I like to offset the camera a bit so that I don't feel too short when playing the game.
![realistic fps prefab gun moves to z position slowly realistic fps prefab gun moves to z position slowly](https://idoc.pub/img/crop/300x300/d2nv726ojrnk.jpg)
Attach this camera to the player by dragging it in the hierarchy and dropping it on the player. We'll do this by using the Main camera already existent within our scene. Now we need to attach a camera to our player. On this gameobject we'll add the character controller by pressing Add Componentin the inspector and then search for Character Controller. Do this by creating an empty gameobject by pressing Crtl + Shift + Nand then name this new object Player. Now that Bolt is installed we'll create our character and then attach a camera to that player. Open up the asset store by pressing Ctrl + 9 and search for Bolt. So assuming we're starting off fresh, we'll have to import bolt into unity before we get started with everything else. So after looking around for a bit and not seeing any simple, straight forward way to create a first person controller using bolt I decided to write a tutorial myself.