How to Add Animations to Our Player | Character Controller (Tutorial 3)

  Рет қаралды 612

Bit Byte Bit

Bit Byte Bit

Күн бұрын

Пікірлер: 7
@kukuha2899
@kukuha2899 Жыл бұрын
Awesome series of tutorials. I would like interaction with the camera in the next tutorial, namely tracking the player and when the camera is turned in the opposite direction from the player, when pressing the forward key, the player walked in the direction of the camera.
@_zeldaking_5830
@_zeldaking_5830 2 жыл бұрын
Keep it up!
@osoascam
@osoascam 2 жыл бұрын
Great tutorial. I used it as a base for learning unity (along with some other Character Controller tutorials) and this is by far the one with the most organized architecture. I have a couple of questions, though. 1. How would I change the states in order to add a state in which you have to smash a button for it to work (say, the quick time events in games where you have to smash Circle for filling up a bar) 2. How would I change the states in order to add a state in which you have to continuously press a button? This confuses me because we don't have access in the States to the release of a button, so, how would we know when to enter ExistState?
@dahstroyer
@dahstroyer 2 жыл бұрын
Ive figured out what to do. Pretty much InputValue is the simplied version of how to handle unity's input system. What you do is get the input action class that was generated. and then get the action you want to handle this is what it should look like CharacterMovement characterInput; //this the auto generated class private void Awake() { characterInput = new CharacterMovement(); } public void OnRun(InputValue input) { characterInput.Character.Run.started += ctx => { SwitchState(runState); }; characterInput.Character.Run.canceled += ctx => { SwitchState(idleState); }; }
@osoascam
@osoascam 2 жыл бұрын
@@dahstroyer Thank you very much!
@osoascam
@osoascam 2 жыл бұрын
@@dahstroyer In case this helps anybody... so, I didn't like the autogenerated class, so I changed it to Invoke Unity Events. That means that on PlayerStateManager I did this on the Start() method: moveAction.performed += OnMove; moveAction.canceled += OnMove; jumpAction.performed += OnJump; And of course I had to add these properties to the class: moveAction = input.actions["Move"]; jumpAction = input.actions["Jump"]; I just liked this approach more since I feel it gave me more flexibility.
@BitByteBit_
@BitByteBit_ 2 жыл бұрын
That’s awesome! I’m glad you were able to find something that worked well for your project! Thanks for sharing!
3 Hours vs. 3 Years of Blender
17:44
Isto Inc.
Рет қаралды 6 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
I Helped 2,000 People Walk Again
15:31
MrBeast
Рет қаралды 26 МЛН
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 787 М.
I Recreated Arcane With $0
15:01
Noggi
Рет қаралды 1,9 МЛН
How To Animate 3D Character Movement In Unity
6:15
Tvtig
Рет қаралды 27 М.
THIRD PERSON MOVEMENT in Unity
21:05
Brackeys
Рет қаралды 1,5 МЛН
Color Quantization and Dithering
11:55
Acerola
Рет қаралды 453 М.
How To Make A Game Alone
8:11
Thomas Brush
Рет қаралды 1,2 МЛН
Why I’m switching from Unity to Unreal Engine
9:02
LixianTV
Рет қаралды 1,2 МЛН