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

  Рет қаралды 77,065

Alexander Zotov

Alexander Zotov

Күн бұрын

Пікірлер: 123
@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 4 жыл бұрын
@@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
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Hi everybody! You can help me a lot by sharing this video if you like it! Thanks in advance!
@patanada
@patanada 6 жыл бұрын
My character just falls trough the ground
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Check colliders, they shouldn't be triggers. Check if you add Rigidbody2D to character or to ground.
@patanada
@patanada 6 жыл бұрын
Works now, had to set tags and layers for plataform and player
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Great!
@christopherrobles9241
@christopherrobles9241 5 жыл бұрын
This is the best no BS tutorial I have ever seen!
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Thank you :-)
@LogicalProgrammer
@LogicalProgrammer 5 жыл бұрын
this is what I am Searching from many days. thanks BROTHER.
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You are welcome! Thanks for your feedback!
@HostileCapybara69
@HostileCapybara69 6 жыл бұрын
This tutorial is gold! Actually it was super productive for me because of the script which you included in the video. Subscribed.
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Thank you very much for your feedback!
@HostileCapybara69
@HostileCapybara69 6 жыл бұрын
Alexander Zotov I learned a lot by studying the script.
@aonmuhammad4305
@aonmuhammad4305 6 жыл бұрын
it's among one of the best tutorials ever. thanx and keep it up.
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Thank you very much)
@reidboulet2685
@reidboulet2685 Жыл бұрын
omg thank you so much for this video i was ripping my hair with the falling animations much praise
@kerm7357
@kerm7357 3 жыл бұрын
THANK YOU SO MUCH I DON'T UNDERSTAND FOR 3 MONTH YOU MAKE ME SO HAPPY I LOVE YOU SO MUCH!!!!!
@geeknaren
@geeknaren 3 жыл бұрын
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..
@adamknight4563
@adamknight4563 5 жыл бұрын
Very good video man, very good and thank you for including the script for me to examine up close!
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
Thanks!
@monkizaki1440
@monkizaki1440 5 жыл бұрын
I actually subbed. You explained this really well, man. Thank you!
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You are welcome!
@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)
@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
@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!!!
@subitdhakal1521
@subitdhakal1521 4 жыл бұрын
Thank you for this wonderful tutorial.
@talos5686
@talos5686 4 жыл бұрын
ty very much for this turtorial
@sendostudiogames
@sendostudiogames Жыл бұрын
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
@talatalaeikhoei7548
@talatalaeikhoei7548 12 күн бұрын
Where can I find the Grass Sprite?
@chrisweck8543
@chrisweck8543 6 жыл бұрын
do you have one on weapon pic up and switching between then?
@freeju2001
@freeju2001 4 жыл бұрын
saved my day man! Thanks a ton.
@AlexanderZotov
@AlexanderZotov 4 жыл бұрын
Happy to help
@bewisoffical
@bewisoffical 2 жыл бұрын
You know it's a good video if you're being told to watch it at colledge.
@danmay3040
@danmay3040 6 жыл бұрын
Very nice explanation, thank you.
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
You are welcome!
@Kopikyatto
@Kopikyatto 5 жыл бұрын
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.
@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.
@aysamatik
@aysamatik 4 жыл бұрын
How can we make each animation colliders different?
@RaihanFitr4
@RaihanFitr4 4 жыл бұрын
to slide press what button in windows?
@AlexanderZotov
@AlexanderZotov 4 жыл бұрын
As you can see at 8:34, line 28, it is Left Shift.
@muhammadikram8009
@muhammadikram8009 6 жыл бұрын
excellent tutorial
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Thanks!
@adnansamol8464
@adnansamol8464 6 жыл бұрын
What a neat and clear explanation....+1Sub
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Thank you!
@anyangle1669
@anyangle1669 3 жыл бұрын
I don't understand dirX please explain this variable
@luckyyanez6362
@luckyyanez6362 5 жыл бұрын
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 :(
@sametbrhan
@sametbrhan 5 жыл бұрын
that is very good video thanks dude
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You are welcome! Thanks for watching!
@danitry3129
@danitry3129 2 жыл бұрын
Can you add attack please
@anupamkumar4109
@anupamkumar4109 4 жыл бұрын
Can you do double jump too please
@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
@troyvaldez1795
@troyvaldez1795 6 жыл бұрын
Help my character is playing the left and right animation so fast but the jump is working properly :(
@estuartyy
@estuartyy 4 жыл бұрын
Sempre me falaram que os melhores tutoriais estavam fora do Brasil
@AlexanderZotov
@AlexanderZotov 4 жыл бұрын
Thank you.
@Transguddit
@Transguddit 5 жыл бұрын
Эй, ну что ты за человек такой?! Такие крутые уроки и на английском! У тебя же винда на русском языке, Александр! Выпускай в двух вариантах - на инглише и на русском. И подписчиков станет на много больше. Короче давай исправляйся:))
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
У меня есть канал на русском. Unity - это просто! называется. Там есть три видоса. Руки все не доходят.
@Transguddit
@Transguddit 5 жыл бұрын
@@AlexanderZotov Подписался. Правда там 2 видоса:))
@sorinaion1365
@sorinaion1365 6 жыл бұрын
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 6 жыл бұрын
Sorry, it's my mistake, as I wrote GetKeyDown instead of just GetKey.Appologise !Tks !
@TheWaruban
@TheWaruban 5 жыл бұрын
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 2 жыл бұрын
same 😭😭
@AlexanderZotov
@AlexanderZotov 2 жыл бұрын
Rigidbody. Is it attached?
@TheWaruban
@TheWaruban 2 жыл бұрын
@@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 2 жыл бұрын
@@AlexanderZotov no😥😥
@Reclamalo
@Reclamalo 6 жыл бұрын
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 6 жыл бұрын
Hi! Thanks for your feedback. I have such of toturial you ask for. Please check out my recent vidoes.
@Reclamalo
@Reclamalo 6 жыл бұрын
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 6 жыл бұрын
Yes, let me know. And ask your questions if you have any. Good luck!
@anggafestiyan9621
@anggafestiyan9621 5 жыл бұрын
thxxxxxxxxxxxx brooo u are awesome
@AlexanderZotov
@AlexanderZotov 5 жыл бұрын
You are welcome!
@p1nkedd200
@p1nkedd200 6 жыл бұрын
How to make teleport and water?
@heartra6057
@heartra6057 3 жыл бұрын
The script field doesn’t open
@MrGeralt09
@MrGeralt09 6 жыл бұрын
Здравствуйте, а не могли бы вы рассказать про проверку касания поверхности через лучи?
@viahoshi4340
@viahoshi4340 5 жыл бұрын
thank you this is great and simple! but the screen is too small i barely can see even with the highest definition 😅
@lik1ns
@lik1ns 6 жыл бұрын
Большое спасибо за хорошое видео, но у меня есть проблема. Во время анимации хотьбы, бега проигрывается анимация прыжка или падения, как это можно исправить?
@-a-5593
@-a-5593 3 жыл бұрын
Thx alot
@GokdenizCetin
@GokdenizCetin 6 жыл бұрын
Great! Make more tutorials please.
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Ok ;-)
@SylentGZ
@SylentGZ 5 жыл бұрын
That cat cute asf
@JonesSeries
@JonesSeries 6 жыл бұрын
I feel disturbed by the cats face with the tongue out
@HostileCapybara69
@HostileCapybara69 6 жыл бұрын
Jones lol
@EMRAutumn
@EMRAutumn 5 жыл бұрын
.. when i played the game.. the character is dead and not standing..
@chrisharvey6244
@chrisharvey6244 6 жыл бұрын
very cool ty...
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
You are welcome)
@chrisweck8543
@chrisweck8543 6 жыл бұрын
can you make this for android and how can i ?
@squarewarriorgames3737
@squarewarriorgames3737 6 жыл бұрын
same. this is animation there is no difference at the devices for animations. only the buttons
@softoscience335
@softoscience335 4 жыл бұрын
Best video
@AlexanderZotov
@AlexanderZotov 4 жыл бұрын
Thanks
@aonmuhammad4305
@aonmuhammad4305 6 жыл бұрын
plz make an intermediate tutorial series and a complete project .
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
I'll think about it. Thank you.
@pantheon4141
@pantheon4141 6 жыл бұрын
it wont play the hurt animation :< help
@leonidberezin7320
@leonidberezin7320 6 жыл бұрын
Отличное видео , спасибо тебе за него)
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Всегда пожалуйста. Спасибо за просмотр)
@oguz-kagan
@oguz-kagan 6 жыл бұрын
thanks :D
@squarewarriorgames3737
@squarewarriorgames3737 6 жыл бұрын
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 6 жыл бұрын
Check out this one kzbin.info/www/bejne/sHyqaZqJp9yVpLM&lc=UgyDKLV3GiRzVAcR1HZ4AaABAg Here is a Dino character that has two legs separated from his body.
@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); } }
@pexactly4980
@pexactly4980 6 жыл бұрын
thanks
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Anytime)
@p1nkedd200
@p1nkedd200 6 жыл бұрын
2:43 why all on russian? Im russian
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Because I love russian!
@p1nkedd200
@p1nkedd200 6 жыл бұрын
@@AlexanderZotov I love английский (english)!
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Я too.
@ekosun129
@ekosun129 6 жыл бұрын
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.
@8978martin
@8978martin 6 жыл бұрын
good super good tutorial thanks please card game tutorial
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Tanks a lot!
@체이시드
@체이시드 3 жыл бұрын
thx
@pedrowilliam2604
@pedrowilliam2604 6 жыл бұрын
Download?
@luxaarts
@luxaarts 6 жыл бұрын
Make video how to move character on android
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
I have several of such tutorials already)
@Alex-eq2um
@Alex-eq2um 6 жыл бұрын
Worst explanation, I couldn't understand anything!
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
Try to watch one more time :-)
@Alex-eq2um
@Alex-eq2um 6 жыл бұрын
The video is 12 minutes long, I've been watching it for 1 hour...
@AlexanderZotov
@AlexanderZotov 6 жыл бұрын
So what exactly is unclear for you?
@Reclamalo
@Reclamalo 6 жыл бұрын
Alright Alex, go around and make a video yourself and for free. It is very well explained.
Idle, Run and Jump Animations - Platformer Unity 2D
10:13
Game Code Library
Рет қаралды 73 М.
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,7 МЛН
How I Won The GMTK Game Jam
25:09
JimmyGameDev
Рет қаралды 370 М.
Hand drawn is easier than pixel art | HD graphics vs low-bit vs Hi-bit
10:00
Escaping Unity Animator HELL
18:18
Lost Relic Games
Рет қаралды 521 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 798 М.
Pixel Art Tips from a Professional Artist - Tips & Tricks
8:01
Goodgis
Рет қаралды 1,2 МЛН
2D PATHFINDING - Enemy AI in Unity
23:13
Brackeys
Рет қаралды 831 М.
MAKING RUN, IDLE & JUMP 2D GAME ANIMATIONS - UNITY TUTORIAL
15:30
Blackthornprod
Рет қаралды 527 М.
How To Animate Your 2D Character in Unity
22:05
Velvary
Рет қаралды 33 М.
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН