Unity 2D Animation Tutorial - Idle Walk Run Slide Jump Fall Hurt Dead Animations And Transitions.

  Рет қаралды 74,522

Alexander Zotov

Alexander Zotov

Күн бұрын

#unitytutorial #simpleunityGame #unityanimationtutorial
In this video tutorial I will show you how to create a set of animations for your character. They will be Idle, Walk, Run, Slide, Jump, Fall, Hurt and Death animations. Also we will create transitions between them and I will show how to control those transitions with quite simple C# script.
TO BLAST! - My New Fun Relaxing Puzzle Game Available On Google Play Store
play.google.com/store/apps/de...
Consider purchasing my ULTIMATE UDEMY COURSE with great discount
www.udemy.com/how-to-make-gam...
If you like what I'm doing then you can support me through
www.patreon.com/alexanderzotov
or here
www.paypal.me/AZotov
Thank you)
Cat Art opengameart.org/content/cat-d...
Fire Art opengameart.org/content/camp-...
Script drive.google.com/open?id=1wNh...
What this video is about and what it can be used for also: unity 2d tutorial,
Full Unity 2D Animation Tutorial, Idle Walk Run Slide Jump Fall Hurt Dead Animations And Transitions, unity animation tutorial, unity idle animation, unity walk animation, unity run animation, unity slide animation, unity jump animation, unity fall animation, unity hurt animation, unity dead animation, unity death animation, unity animation transition, unity animation transition script, unity animation transition tutorial, unity 2d animation, unity animation, learn unity fast, unity tutorial, how to make games with unity, unity how to make game, unity how to make 2d game, not as good as brackeys but good as well.

Пікірлер: 125
@Dyzinel
@Dyzinel 5 жыл бұрын
Excelent video, it helped me a lot since I had no idea how to link animation to actions. But that being already said, there's something else I must tell... Dat's quite the ahegao face that cat got right there!
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
:-)
@finns
@finns 3 жыл бұрын
@@AlexanderZotov A question, how can I delete running, so that I only have walking with the animation? And with your script my character can't slide... hmm
@geeknaren
@geeknaren 2 жыл бұрын
Awesome Tutorial under few mins. That's exactly what I was looking for. Thanks a lot man!
@syedmoinuddin8444
@syedmoinuddin8444 6 жыл бұрын
I like your tutorials very much.. They are simple and effective. Thanks for your wonderful tutorials. Most of the concepts are covered in your tutorials..
@aonmuhammad4305
@aonmuhammad4305 6 жыл бұрын
it's among one of the best tutorials ever. thanx and keep it up.
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Thank you very much)
@NewEnglandModz
@NewEnglandModz 5 жыл бұрын
Thank you! One of the only helpful animation tutorials I've found!
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You are welcome! Thanks for your feedback!
@LogicalProgrammer
@LogicalProgrammer 5 жыл бұрын
this is what I am Searching from many days. thanks BROTHER.
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You are welcome! Thanks for your feedback!
@christopherrobles9241
@christopherrobles9241 4 жыл бұрын
This is the best no BS tutorial I have ever seen!
@AlexanderZotov
@AlexanderZotov 4 жыл бұрын
Thank you :-)
@HostileCapybara69
@HostileCapybara69 5 жыл бұрын
This tutorial is gold! Actually it was super productive for me because of the script which you included in the video. Subscribed.
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Thank you very much for your feedback!
@HostileCapybara69
@HostileCapybara69 5 жыл бұрын
Alexander Zotov I learned a lot by studying the script.
@adamknight4563
@adamknight4563 4 жыл бұрын
Very good video man, very good and thank you for including the script for me to examine up close!
@AlexanderZotov
@AlexanderZotov 4 жыл бұрын
Thanks!
@monkizaki1440
@monkizaki1440 4 жыл бұрын
I actually subbed. You explained this really well, man. Thank you!
@AlexanderZotov
@AlexanderZotov 4 жыл бұрын
You are welcome!
@subitdhakal1521
@subitdhakal1521 4 жыл бұрын
Thank you for this wonderful tutorial.
@kartr4166
@kartr4166 4 жыл бұрын
Awesome video! I was so stuck on trying to make transitions work but this got me there!
@AlexanderZotov
@AlexanderZotov 4 жыл бұрын
Happy to help
@kermceylan7357
@kermceylan7357 2 жыл бұрын
THANK YOU SO MUCH I DON'T UNDERSTAND FOR 3 MONTH YOU MAKE ME SO HAPPY I LOVE YOU SO MUCH!!!!!
@reidboulet2685
@reidboulet2685 Жыл бұрын
omg thank you so much for this video i was ripping my hair with the falling animations much praise
@talos5686
@talos5686 3 жыл бұрын
ty very much for this turtorial
@thelastbrick1973
@thelastbrick1973 6 жыл бұрын
Love your videos cause there super easy to follow and get right to the point. Do you think you could make a tutorial on how to make a checkpoint on a map. And maybe something that says the distance your character is from that checkpoint?
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Thank you! Interesting idea)
@freeju2001
@freeju2001 4 жыл бұрын
saved my day man! Thanks a ton.
@AlexanderZotov
@AlexanderZotov 4 жыл бұрын
Happy to help
@danmay3040
@danmay3040 5 жыл бұрын
Very nice explanation, thank you.
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You are welcome!
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Hi everybody! You can help me a lot by sharing this video if you like it! Thanks in advance!
@patanada
@patanada 5 жыл бұрын
My character just falls trough the ground
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Check colliders, they shouldn't be triggers. Check if you add Rigidbody2D to character or to ground.
@patanada
@patanada 5 жыл бұрын
Works now, had to set tags and layers for plataform and player
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Great!
@adnansamol8464
@adnansamol8464 5 жыл бұрын
What a neat and clear explanation....+1Sub
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Thank you!
@-a-5593
@-a-5593 3 жыл бұрын
Thx alot
@muhammadikram8009
@muhammadikram8009 5 жыл бұрын
excellent tutorial
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Thanks!
@oguz-kagan
@oguz-kagan 5 жыл бұрын
thanks :D
@sametbrhan
@sametbrhan 5 жыл бұрын
that is very good video thanks dude
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You are welcome! Thanks for watching!
@user-ph4bt4qf7x
@user-ph4bt4qf7x 3 жыл бұрын
thx
@chrisharvey6244
@chrisharvey6244 6 жыл бұрын
very cool ty...
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
You are welcome)
@pexactly4980
@pexactly4980 6 жыл бұрын
thanks
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Anytime)
@anggafestiyan9621
@anggafestiyan9621 5 жыл бұрын
thxxxxxxxxxxxx brooo u are awesome
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You are welcome!
@chrisharvey6244
@chrisharvey6244 6 жыл бұрын
Alexander, I was wondering if you could give a crack at inserting 2 or 3 animation frames of a character turning before the animation of walking with directional movement too!!!
@bewisoffical
@bewisoffical Жыл бұрын
You know it's a good video if you're being told to watch it at colledge.
@leonidberezin7320
@leonidberezin7320 6 жыл бұрын
Отличное видео , спасибо тебе за него)
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Всегда пожалуйста. Спасибо за просмотр)
@GokdenizCetin
@GokdenizCetin 5 жыл бұрын
Great! Make more tutorials please.
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Ok ;-)
@softoscience335
@softoscience335 4 жыл бұрын
Best video
@AlexanderZotov
@AlexanderZotov 4 жыл бұрын
Thanks
@estuartyy
@estuartyy 3 жыл бұрын
Sempre me falaram que os melhores tutoriais estavam fora do Brasil
@AlexanderZotov
@AlexanderZotov 3 жыл бұрын
Thank you.
@SylentGZ
@SylentGZ 5 жыл бұрын
That cat cute asf
@chrisweck8543
@chrisweck8543 6 жыл бұрын
do you have one on weapon pic up and switching between then?
@viahoshi4340
@viahoshi4340 4 жыл бұрын
thank you this is great and simple! but the screen is too small i barely can see even with the highest definition 😅
@batemanopr
@batemanopr 5 жыл бұрын
Exelent tutorial!! but I need a little help, I'm trying to decrease the speed for the walking and running animation to 0.6 and 1.5 respectively, but the walking animation never gets to true with this number, when I put it to 1 it works but it gets to fast for me, can someone help? (i'm making a pixel art game, so it is way smaller and needs lower speed). And another thing is that I am dying when touching any trigger collider on the map
@s3ndostudio546
@s3ndostudio546 4 ай бұрын
thanks for your video, I have a doubt... when I run and jump, the jump is normal, how can I make it so that when the character is running and jumps, the jump has the same speed? thank you very much
@Kopikyatto
@Kopikyatto 4 жыл бұрын
Using this code for animations how would it be possible to slow down the character when he is sliding so that he doesn't slide forever with the same speed.
@Reclamalo
@Reclamalo 5 жыл бұрын
Hello Buddy! I do love your tutorial, I am still out of home! So! I have a very lazy question (And sorry) May this work with Android plataform as well? I mean, If for example I use this same scenario but with Android plataform (Have followed also your UI tutorial with controls) Can work? Cheers buddy. Thank you!
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Hi! Thanks for your feedback. I have such of toturial you ask for. Please check out my recent vidoes.
@Reclamalo
@Reclamalo 5 жыл бұрын
Oh yes! I just saw it! I have created my characters from Illustrator with animations. But I think the C# part have killed me. Hopefully your video is going to be of help! I will let you know! Thank you again!
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Yes, let me know. And ask your questions if you have any. Good luck!
@MrGeralt09
@MrGeralt09 6 жыл бұрын
Здравствуйте, а не могли бы вы рассказать про проверку касания поверхности через лучи?
@8978martin
@8978martin 6 жыл бұрын
good super good tutorial thanks please card game tutorial
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Tanks a lot!
@lik1ns
@lik1ns 5 жыл бұрын
Большое спасибо за хорошое видео, но у меня есть проблема. Во время анимации хотьбы, бега проигрывается анимация прыжка или падения, как это можно исправить?
@NewEnglandModz
@NewEnglandModz 5 жыл бұрын
This works in the editor, but when I build the game, the sprites in all of my animations flicker and sometimes flicker briefly to different unrelated sprites. Has this happened to anyone? I desperately need help.
@aysamatik
@aysamatik 4 жыл бұрын
How can we make each animation colliders different?
@luckyyanez6362
@luckyyanez6362 4 жыл бұрын
sir can you help me out? i keep writing the codes but it's not running when I press play. It's not being called, especially those functions with parameters idk how will I call it in Start or Update function. I'm tired of exactly copying someone's code :(
@Transguddit
@Transguddit 5 жыл бұрын
Эй, ну что ты за человек такой?! Такие крутые уроки и на английском! У тебя же винда на русском языке, Александр! Выпускай в двух вариантах - на инглише и на русском. И подписчиков станет на много больше. Короче давай исправляйся:))
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
У меня есть канал на русском. Unity - это просто! называется. Там есть три видоса. Руки все не доходят.
@Transguddit
@Transguddit 5 жыл бұрын
@@AlexanderZotov Подписался. Правда там 2 видоса:))
@aonmuhammad4305
@aonmuhammad4305 6 жыл бұрын
plz make an intermediate tutorial series and a complete project .
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
I'll think about it. Thank you.
@daniellclary
@daniellclary 6 жыл бұрын
Well I went through the tutorial and in the end it did not work. I even got your script and just pasted it in. And all I can get the character to do is jump, and even if it jumps, it does not use the jump animation. None of the other keys do anything. So I have no clue to what is wrong.
@anupamkumar4109
@anupamkumar4109 3 жыл бұрын
Can you do double jump too please
@troyvaldez1795
@troyvaldez1795 5 жыл бұрын
Help my character is playing the left and right animation so fast but the jump is working properly :(
@sorinaion1365
@sorinaion1365 5 жыл бұрын
Hi Alex,for me, the running animation is never working. When leftShift is pressed, the movingSpeed became 10, but the dirX will be zero, as it depends on getAxisRaw, so the cat is idleing. Please help me to solve this!Tks!
@sorinaion1365
@sorinaion1365 5 жыл бұрын
Sorry, it's my mistake, as I wrote GetKeyDown instead of just GetKey.Appologise !Tks !
@danitry3129
@danitry3129 Жыл бұрын
Can you add attack please
@JonesSeries
@JonesSeries 5 жыл бұрын
I feel disturbed by the cats face with the tongue out
@HostileCapybara69
@HostileCapybara69 5 жыл бұрын
Jones lol
@anyangle1669
@anyangle1669 3 жыл бұрын
I don't understand dirX please explain this variable
@squarewarriorgames3737
@squarewarriorgames3737 5 жыл бұрын
good tutorial loved it^^ could u also make a tutorial for animation but with body parts? i mean where the sprite has his own 2arms 2 legs head and body and we are going to make our animations with them :)
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Check out this one kzbin.info/www/bejne/sHyqaZqJp9yVpLM&lc=UgyDKLV3GiRzVAcR1HZ4AaABAg Here is a Dino character that has two legs separated from his body.
@ekosun129
@ekosun129 5 жыл бұрын
Hello . Your videos Tuttorial Is Very Good Tuttorial. ------------------- Can you Give me A tuttorial To Create Set Active Botton LED divice (light Device / Lamp). Sory, if my English Not good.
@TheWaruban
@TheWaruban 4 жыл бұрын
Awesome, easily the best stuff about unity around here. the video is one year old so I might not get any answer but let s try anyway : I did everything and it works perfectly on boxcolliders however my player seems to not detect Edge colliders. animation gets stuck and it keepts "falling". does anyone have any idea ??
@bimokayoba
@bimokayoba Жыл бұрын
same 😭😭
@AlexanderZotov
@AlexanderZotov Жыл бұрын
Rigidbody. Is it attached?
@TheWaruban
@TheWaruban Жыл бұрын
@@AlexanderZotov I don't remember how I fixed it cause it was ... 3 years ago. But hey, thank you for the answer anyway lol
@bimokayoba
@bimokayoba Жыл бұрын
@@AlexanderZotov no😥😥
@RaihanFitr4
@RaihanFitr4 3 жыл бұрын
to slide press what button in windows?
@AlexanderZotov
@AlexanderZotov 3 жыл бұрын
As you can see at 8:34, line 28, it is Left Shift.
@p1nkedd200
@p1nkedd200 5 жыл бұрын
How to make teleport and water?
@chrisweck8543
@chrisweck8543 6 жыл бұрын
can you make this for android and how can i ?
@squarewarriorgames3737
@squarewarriorgames3737 5 жыл бұрын
same. this is animation there is no difference at the devices for animations. only the buttons
@skywoker123456
@skywoker123456 6 жыл бұрын
А как сделать двойной прыжок?
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Пожалуйста) kzbin.info/www/bejne/mYLUkGigbryof6s
@skywoker123456
@skywoker123456 6 жыл бұрын
спасибо большое
@skywoker123456
@skywoker123456 6 жыл бұрын
добавил двойной прыжок, анимация перестала работать. подскажи пожалуйста где ошибка? using System.Collections; using System.Collections.Generic; using UnityEngine; public class Cat : MonoBehaviour { Rigidbody2D rb; Animator anim; float dirX, moveSpeed = 10f; bool facingRight = true; Vector3 localScale; public float jumpForce = 500f; bool doubleJumpAllowed = false; bool onTheGround = false; // Use this for initialization void Start () { rb = GetComponent (); anim = GetComponent (); localScale = transform.localScale; } // Update is called once per frame void Update () { if (rb.velocity.y == 0) onTheGround = true; else onTheGround = false; if (onTheGround) doubleJumpAllowed = true; if (onTheGround && Input.GetButtonDown ("Jump")) { Jump (); } else if (doubleJumpAllowed && Input.GetButtonDown ("Jump")) { Jump (); doubleJumpAllowed = false; } dirX = Input.GetAxis ("Horizontal") * moveSpeed; } void FixedUpdate() { rb.velocity = new Vector2 (dirX, rb.velocity.y); } void LateUpdate() { CheckWhereToFace(); } void SetAnimationState() { if (dirX == 0) { anim.SetBool ("isRunning", false); } if (rb.velocity.y == 0) { anim.SetBool ("isJumping", false); anim.SetBool ("isFalling", false); } if (Mathf.Abs(dirX) == 10 && rb.velocity.y == 0) anim.SetBool ("isRunning", true); else anim.SetBool ("isRunning", false); if (Input.GetKey (KeyCode.DownArrow) && Mathf.Abs(dirX) == 10) anim.SetBool ("isSliding", true); else anim.SetBool ("isSliding", false); if (rb.velocity.y > 0) anim.SetBool ("isJumping", true); if (rb.velocity.y < 0) { anim.SetBool ("isJumping", false); anim.SetBool ("isFalling", true); } } void CheckWhereToFace() { if (dirX > 0) facingRight = true; else if (dirX < 0) facingRight = false; if (((facingRight) && (localScale.x < 0)) || ((!facingRight) && (localScale.x > 0))) localScale.x *= -1; transform.localScale = localScale; } void Jump() { rb.velocity = new Vector2 (rb.velocity.x, 0f);; rb.AddForce (Vector2.up * jumpForce); } }
@pantheon4141
@pantheon4141 5 жыл бұрын
it wont play the hurt animation :< help
@heartra6057
@heartra6057 3 жыл бұрын
The script field doesn’t open
@EMRAutumn
@EMRAutumn 5 жыл бұрын
.. when i played the game.. the character is dead and not standing..
@luxaarts
@luxaarts 6 жыл бұрын
Make video how to move character on android
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
I have several of such tutorials already)
@pedrowilliam2604
@pedrowilliam2604 5 жыл бұрын
Download?
@p1nkedd200
@p1nkedd200 5 жыл бұрын
2:43 why all on russian? Im russian
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Because I love russian!
@p1nkedd200
@p1nkedd200 5 жыл бұрын
@@AlexanderZotov I love английский (english)!
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Я too.
@Alex-eq2um
@Alex-eq2um 5 жыл бұрын
Worst explanation, I couldn't understand anything!
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Try to watch one more time :-)
@Alex-eq2um
@Alex-eq2um 5 жыл бұрын
The video is 12 minutes long, I've been watching it for 1 hour...
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
So what exactly is unclear for you?
@Reclamalo
@Reclamalo 5 жыл бұрын
Alright Alex, go around and make a video yourself and for free. It is very well explained.
КАК СПРЯТАТЬ КОНФЕТЫ
00:59
123 GO! Shorts Russian
Рет қаралды 3,2 МЛН
1 класс vs 11 класс (неаккуратность)
01:00
2D Movement in Unity (Tutorial)
21:09
Brackeys
Рет қаралды 3 МЛН
I got the world record for Cut The Rope
20:31
EazySpeezy
Рет қаралды 31 М.
Idle, Run and Jump Animations - Platformer Unity 2D
10:13
Game Code Library
Рет қаралды 27 М.
AI Learns to Play Tag (deep reinforcement learning)
10:29
AI Warehouse
Рет қаралды 41 М.
2D Animation in Unity (Tutorial)
21:53
Brackeys
Рет қаралды 2,4 МЛН
Complex Animations made Simple with Blend Trees!
12:06
Code Monkey
Рет қаралды 40 М.
I Learned Blender in 30 Days
14:24
OverPhil Dev
Рет қаралды 66 М.
Improve your Platformer’s Jump (and Wall Jump) | Unity
8:12
How to make a Video Game - Godot Beginner Tutorial
1:17:12
Brackeys
Рет қаралды 1 МЛН
MAKING RUN, IDLE & JUMP 2D GAME ANIMATIONS - UNITY TUTORIAL
15:30
Blackthornprod
Рет қаралды 507 М.
КАК СПРЯТАТЬ КОНФЕТЫ
00:59
123 GO! Shorts Russian
Рет қаралды 3,2 МЛН