Controlling a Character using the Character Controller (Unity Tutorial)

preview_player
Показать описание
In this Unity game development tutorial we're going to look at how we can use the Character Controller component to move a character around a scene and have them collide properly with obstacles.

00:00 - Introduction
00:37 - Adding an Obstacle for our Character
01:17 - Adding a Character Controller Component
02:03 - Recap of Movement and Rotation Script
03:14 - Altering the Script to use the Character Controller
04:21 - Testing out the new Script
04:33 - Explanation of Slope Limit and Step Offset
04:57 - Adding a Slope and Steps to the Scene
06:12 - Testing that the Character can go up Slopes and Steps
06:58 - Summary

#KetraGames #LearnUnity #UnityTutorials #UnityTips
Рекомендации по теме
Комментарии
Автор

Perfect tutorials, concise infos right on the point.
Wish I found this channel earlier, could have saved so much time!

geams
Автор

These tutorials are so good, thanks so much for the nice work!

manulenc
Автор

If you have a first-person camera and want your player to move where the camera is facing, change the movementDirection equation. Using transform, allows us to take the direction the player is facing and move in a direction, whereas creating a new Vector3 would move along the game's x and z axis. Ex:

Vector3 movementDirection = transform.right * horizontalInput + transform.forward * verticalInput;

Please correct me if I am wrong about anything, I am learning too!

imkappy
Автор

You're a real lifesaver! I appreciate it, thank you very much!

MLaurenavicius
Автор

Commenting so you get additional visibility. Amazing tutorials for beginners

wanderingturtle
Автор

Hi..this is a great tutorial.. help me a lot!

razikhodari
Автор

This is a great tutorial, helped me out a lot! Only thing I'm slightly confused on is that your character seems to obey gravity by default, while mine reaches the top of the ramp/stairs and then hovers there if I try to move back down the ramp.

Great work!

charliedaloon
Автор

Great tutorial, but I think you forgot to explicitly mention that you changed the script of your last video, because now "speed" is multiplied with the mathf in line 20, which wasn't shown in the previous video of the series.

lexiferenczy
Автор

Хоть я ин знаю английский язык, но видос до такой степени понятный что я все повторил и у меня получилось.
Девушка спасибо за труд в создании урока 🔥
Дальше в том же духе!

oldborodach
Автор

been following your tutorials and they're rlly good..but right now im having a problem with magnitude in the script...it says tht "the name magnitude doesnt exist in the current in the current context and I rlly dont know how to fix that :') any help?

mfjokld
Автор

Hi, Ketra. If I want to make an isometric movement how can i do it with character controller? I know i need to change the directions left, right, up and down but i dont know how to do it. Can you please help?

alperakin
Автор

Great tutorial, thank you very much!
The only problem I have is when I try to go down the slope the character starts to bounce a little. How can I fix this?

steeltm
Автор

I have a problem: When I use SimpleMove, the gravity is fine, the player can rotate but they can't move.

When I use Move, the player can move and rotate freely but isn't affected by Gravity. How can I fix this?

benchmarked
Автор

i liked the movement of the transform.Translate better. is there a way to keep that movement and add jumping and so on?

joejutsu
Автор

Hey, Ketra! Why do you call the charactercontroller from the start method and not the awake method?

Tukyo
Автор

Hi, Thank you so much for your clip. It's helpful. Could I ask a question? When I use * magnitude);" the character seems to fall from the top and disappear, the y value jumps continuously at negative. How should I solve it?

bupyvn
Автор

Hey im not sure whats going on but my characters speed isnt at what i set it at? how do i fix this

flitz
Автор

As always, a wonderful tutorial. I'm already on and my player is jumping :) You explain everything great, you are a great teacher. Thank you for sharing your knowledge.
One thing makes me sad. After adding a character controller, my player moves very slowly, as if there is friction between him and the terrain. I reduced gravity to 1, increased speed but still moves like a grandpa with a walking frame👴 (I love grandpas with a walking frame, but this game should be faster 🙂)

aleksandraaleksandra
Автор

does CharacterController have Gravity like RigidBody ?

zenzren
Автор

When I import the Character Controller to my character, it makes my character move slowly down

thuluong