Тёмный
No video :(

Character Rotation | Simple Character Controller in Unity | Part 3 

chunky bacon games
Подписаться 2,9 тыс.
Просмотров 23 тыс.
50% 1

Here's the third part of the Simple Character Controller series, and today we will be making our character rotate and face the direction we're moving in!
Let me know if you have any questions or requests, and I'll try my best to help you!
This series is mainly aimed towards beginners wanting to learn how the New Input System works.
● Grab the code from GitHub: github.com/chu...
● Link to the full project: github.com/chu...
● The whole series: • Simple Character Contr...
► Subscribe: / @chunkybacongames
● Twitter/X: x.com/chunkyba...
● GitHub: github.com/chu...
#unity3d #unitytutorial #inputsystem

Опубликовано:

 

8 ноя 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 40   
@Tysard
@Tysard Год назад
I'm really happy I stumbled across your channel. I never really used character controllers before and this series is very clear and concise so I appreciate your content and thank you for making it. I was going to ask a question but fortunately I figured out my rookie mistake so I'll just share my problem and solution incase someone else has the same issue. If you're making something like a twin stick shooter and find that using a joystick, your aim is inaccurate/snaps to 8 directions, the code is not the issue. To make your aim more accurate, just open your Input Action Asset and click whatever binding you have set as your "Look" composite (this would be the "Move" composite if you followed part 1 and haven't added any other bindings). Change the "Mode" from "Digital Normalized" to "Analog" and save the asset. It may seem silly but I spent a good hour debugging before I figured out that my issue was the input being normalized and not the code doing something I didn't understand.
@straylight08
@straylight08 Год назад
Enjoying these videos. Really well explained
@tigerjustice
@tigerjustice Год назад
Your lessons help me a lot to learn Unity. Thank you very much )
@mohammadmohamoud895
@mohammadmohamoud895 2 месяца назад
You're genious⚡
@mysh229
@mysh229 Год назад
Thanks for the guides :) Just what I've been looking for
@chunkybacongames
@chunkybacongames Год назад
Glad to hear that! Thank you! 🤗
@user-cn6vy9yu7i
@user-cn6vy9yu7i 5 месяцев назад
Thanks for your video, with subtittles, you're the best 👍
@cachau9920
@cachau9920 Год назад
straight to the point, easy to follow and very helpful. ez sub
@chunkybacongames
@chunkybacongames Год назад
Thanks, much appreciated! 🤗
@wermisapalma8884
@wermisapalma8884 Год назад
Really useful to me. I am so impressed.
@chunkybacongames
@chunkybacongames Год назад
Very glad to hear that, thank you! 🤗
@wermisapalma8884
@wermisapalma8884 Год назад
@@chunkybacongames thank very much :)
@amac333
@amac333 6 месяцев назад
thanks man this was perfect! math ftw
@xx11s
@xx11s 2 месяца назад
Ty
@anthonyroseiro
@anthonyroseiro 4 месяца назад
Thank you 🙂
@tahacap8573
@tahacap8573 Год назад
incredible tutorial!
@chunkybacongames
@chunkybacongames Год назад
Thank you, glad you liked it! 🤗
@tahacap8573
@tahacap8573 Год назад
@@chunkybacongames thanks a lot again. you explained it very understandable and clearly.
@HelionGames
@HelionGames Год назад
Thanks 👍
@biocronic2986
@biocronic2986 3 месяца назад
very good.
@chunkybacongames
@chunkybacongames 2 месяца назад
Thanks, glad to hear that! 🤗
@hi-fi2680
@hi-fi2680 11 месяцев назад
great
@gravecastleofficial
@gravecastleofficial 3 месяца назад
I don't understand how one is supposed to figure out these problems. Like, how would you know to make an if statement for the _input square magnitude in order to solve the snap forward feature? when hovering over the line, it literally only says "returns the squared length of the vector" lol. as if I can just understand that by itself.
@swagtrapswag
@swagtrapswag 6 месяцев назад
Hi, I doubt you will see this message but I have got all of this code exactly the same as yours yet it says c1519 invalid token '=' in class, record, struct or interface member declaration, i cannot find anything for this one since i have the exact line by line code from you, Please help
@petitcoke
@petitcoke 4 месяца назад
how would that last part work if you're using the new input system?
@VeryTori
@VeryTori Год назад
Thanks for doing this series! The character no longer snaps to a direction after letting go of the keys, but it is still snapping to the 8 directions rather than being fluid. Not sure if that is supposed to happen, or if I messed up somewhere.
@AaronAsherRandall
@AaronAsherRandall 9 месяцев назад
I have exactly the same problem. Did you find a fix for this?
@derpysnakemusic3676
@derpysnakemusic3676 8 месяцев назад
3:00
@Lucasvesterlund
@Lucasvesterlund 2 месяца назад
I suppose you're not still stuck on this issue, but in case anyone else gets this problem (like I did), the fix for me was to set the smooth time in the editor to 0.05 in . Somehow it didn't follow from my script into the editor automatically.
@Delvarn
@Delvarn Год назад
I had this working earlier but when I've come back to it, my rotation isn't working at all. Its as if it can only read one direction at a time. Any idea why I can't rotate while moving?
@jankystreams3337
@jankystreams3337 Год назад
How would I go about applying animations to a character using this code? I am using an actual mesh and animations I made rather than a capsule.
@dubosemeline1254
@dubosemeline1254 9 месяцев назад
Hello ! I've used your code, and even copied/pasted yours to make sure I disn't miswrite something, but when I play the scene and move my character around, it always has a "floating moment", like even when I release a key the player still moves for around half a second. Do you know what could cause such a thing ? Anyway thank you for your videos, they're helping a lot :D
@dubosemeline1254
@dubosemeline1254 9 месяцев назад
Nevermind I found my answer, the problem was that I accidentally added a rigidbody component to my character !
@chanelwilson9372
@chanelwilson9372 10 месяцев назад
I put in var targetAngle:float = Mathf.Atan2(y:_directon.x, x:_direction.z) * Mathf.Rad2Deg; transform.rotation = Quaternion.Euler(x:0.0f, y:targetAngle, z:0.0f); and it say identifier expected what does that mean
@chunkybacongames
@chunkybacongames 10 месяцев назад
I’m guessing the confusion lies in my editor. This is what the code for targetAngle should look like: var targetAngle = Mathf.Atan2(_direction.x, _direction.z) * Mathf.Rad2Deg; The types are just visual indicators to tell me what value the method expects. :)
@toadieboi3974
@toadieboi3974 Год назад
1:45 I've followed through with typing out the code that you've presented, alongside following the rest of the tutorial up to this point, but when I try to playtest said code, I end up with three complier errors, what causes this? In specific, it says I don't/have misplaced a semicolon and a "}" and that I don't have an identified.
@toadieboi3974
@toadieboi3974 Год назад
wait it's cool i just thought the "float:" part of the code was messing with everything
@mj-nl3fc
@mj-nl3fc Год назад
Hi, how to move forward relative to rotation?
@Minir1
@Minir1 Год назад
This is so complicated, I dont understand everything. But i started Game Development 1 week ago, to be fair.
@chunkybacongames
@chunkybacongames Год назад
Let me know if I can help you in any way, and good luck! You’ll do just fine! 🤗
Далее
10 Minutes vs. 10 Years of Animation
19:29
Просмотров 834 тыс.
would you eat this? #shorts
00:39
Просмотров 2,9 млн
They made a game about philosophy...
23:19
Просмотров 404 тыс.
I Tried To Beat Minecraft Backwards
18:53
Просмотров 1,2 млн
Understand Unity Rotation in 5 minutes
5:23
Просмотров 15 тыс.
Dear Game Developers, Stop Messing This Up!
22:19
Просмотров 704 тыс.
A new way to generate worlds (stitched WFC)
10:51
Просмотров 523 тыс.