First Person Character Controller with Unity + Playmaker

preview_player
Показать описание
In this video, you will learn how to make a player gameObject move around with WASD and arrow keys, set up the first-person camera, and set up the player speed variable.

Sample package requirements:
Playmaker 1.9.1 or newer and Unity 2018.4 or newer + built-in render pipeline.

Timestamps
00:00 - Intro
00:30 - Setting up the scene
01:16 - Setting up player movement with keys
02:45 - Customize the keys for movement (input manager)
03:40 - Setting up the first-person camera
06:45 - Hiding and locking the cursor/mouse
07:07 - Player speed variable

Some helpful info on character controllers by Nicky B:

For more help visit:

Find us on Twitter @HutongGames
Рекомендации по теме
Комментарии
Автор

There are so many tuts out there but I've yet to see one better than these, clearly spoken, straight to the point and entertaining. I just got PM, please keep up the good work

aeon_zero
Автор

Tired, bad sleep last night, was still able to follow and excute this tutorial with ease. Thanks so much for the quality videos.

kylemakesgames
Автор

Awesome tool, with a just as awesome tutorial series. Absolutely mind blowing how intuitive your plugin is, thanks so much for making a really accessible tool!
Oh yeah, I really wanted to re-iterate how in-depth this series is, they teach you how to use the system they've created, so you can experiment, and make what you really want with it.
They tell you how everything works, really!

christophereberhart
Автор

Oh my goodness, I love these tutorials, and the comic relief's awesome 😁 cracks me up at the beginning of the lesson and by doing so, gives an in-depth soothing environment for quick and enjoyable learning curves. 👍 Great job.

jvdongames
Автор

Always love Stephens video editing and comedy!

rustychickengames
Автор

This was amazing, please keep going with EVERYTHING!! love the humor and the way you teach. Good Job.

CaelCerf
Автор

These tutorials are so good! Informative and with a dash of humor. Great Work! <3

charliealvarado
Автор

This video was so so helpful! Everything welt smooth and idk how but surely will look further your videos! :) :) :) THANK YOU SO MUCH 👽👽

hatza.a.a.a
Автор

At 0:45 they change the scale to 2, claiming that it makes the size 6 ft. Don't do this for 2 reasons: Firstly the 1 scale capsule is already 6ft, so they''ve turned that object into something which is 12ft tall. Second is that when you get to video 4 of this tutorial (Grab and throw objects with Playmaker), if you grab an object then it will start stretching horribly due to the 2 scale of player. So keep player scale at 1.

phantasmrain
Автор

This guy is so great! So funny too! Best content, without a doubt!

AhmadAbuGdairi
Автор

A new user here I love the way you do your presentations everything is clear and straightforward the humour is a must and I can't live without it I'm so happy that I purchased your tool as a pure artist with no programming knowledge you gave me again the hope I was in need to start working on my dream game again I was stupid because I let so many years get away but never is to late thank you and your team so much for this amazing asset

DarkHeliosGamesInteractive
Автор

Brilliant humor!!! and nice explanations too. you are the best!

Sherman_King
Автор

Notes for myself

Setting up the scene
0:29 Create a Plane. 3D Object > Capsule (for the player). Change its scale (Unity’s default measure unit is metres). Add FSM to player, name it PlayerMovement. Add Controller Simple Move action. Can add a CharacterController Component yourself or click to add it. Change Character Controller Radius - 0.8.
2:07 Controller Simple Move needs input to Move Vector. Add Get Axis Vector action. Store Vector in New Variable, name it playerMoveVector3. Controller Simple Move - Move Vector > playerMoveVector3. Press Play, now capsule moves with WASD keys.
2:45 Edit > Project Settings - look at Horizontal and Vertical and you can change their controls if you want.

Setting up the first-person camera
3:38 Right click Player object > Camera. Move camera to where you want it in the Capsule.
4:15 Add FSM to capsule. (In Inspector) Add Component > PlayMakerFSM, name it ‘PlayerLook’. > Edit. Add mouse Look action, Specify Game Object as PlayerCamera. Axes > Mouse Y. Press Play, you can move and look up and down.
5:13 Add Mouse Look action, keep Use Owner, Axes > Mouse X. Press Play, can move and look everywhere, but it doesn’t walk where you look. PlayerMovement FSM > Edit. In Get Axis Vector action, drag Player object to it, makes moving forward always relative to moving forward for the capsule, same thing for other directions. Blue Z arrow points to what Unity considers forward. Now it steers where you look.

Hiding and locking the cursor/mouse
6:45 Player Look (FSM) > Edit, add Set Mouse Cursor action, check Hide Cursor and Lock Cursor so you don’t click outside of the screen.

Player speed variable
7:04 In PlayerMovement (FSM) > Edit, in Controller Simple Move, can change Speed, but better to make Speed > New Variable, name it. In Variables tab, select that variable and set its value (speed) what you want, so if you’ll want things in the game to change how fast the player moves, you can reference this variable.

7:56 Wrap up. We learned to create player movement with Controller Simple Move and Character Controller component, how to look and steer with two Mouse Look actions.

striverfor
Автор

@5:20 changing mouse look to "use owner" moves the object it's attached to. "Specifying game object" moves an object parented to the object it's attached to.

danielnorton
Автор

all explained very well, one thing though, when you say to insert the gameobject player in the "relative to" ... I had to insert the camera of the player to make it move in the direction of the view otherwise it didn't work ... I don't know why

ragnar
Автор

Thank you for making this video and help us to learn how to make it :D I had a problem with the asset first person, if you press escape and dont click back. it freezes the camera movement. so i have to fix and make a first person in the game. lucky there is a video about this.

roxannafabiolastefaniuc
Автор

player is sliding when I use w-a-s-d input why? ( Horizontal transform )

aresbs
Автор

yhe finally after 4 year we getting this good helping stuffs

durgayadav
Автор

My FSM doesn't seem to have the Get Axis Vector action, has it been removed?

moonquest
Автор

Since I'm a stupid goat, to make something like this in code it required me like 8 hours, with playmaker just 8 minutes and easily understandable too? Well, no wonder I'm buying it right now

PorcoPorchetto