Тёмный

2D Melee in Unity Tutorial 

Muddy Wolf
Подписаться 12 тыс.
Просмотров 16 тыс.
50% 1

Learn how to create 2D Top down Melee in Unity easily with a cool sword!
// JOIN THE COMMUNITY DISCORD!
/ discord
// PLAY MY DAMN GAME ALREADY?
play.google.com/store/apps/de...
// WEB DEV CHANNEL
/ tylerpotts

Хобби

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

 

7 янв 2023

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 46   
@adhoahsgamingdnd9617
@adhoahsgamingdnd9617 Год назад
I've been working on a top down rpg game with waves of enemies, and your videos are always a nice insight on how some of these mechanics can be done and I always enjoy them!
@MuddyWolf
@MuddyWolf Год назад
Woo! I'm happy to help! 💪
@DragoTheSpider
@DragoTheSpider 3 месяца назад
for anyone who wants it to follow the cursor just attach this piece of code to a script and attach the scrip to the parent of the weapon no i dont mean the player. Vector3 mousePos = Input.mousePosition; Vector3 screenPoint = Camera.main.WorldToScreenPoint(transform.position); Vector2 offset = new Vector2(mousePos.x - screenPoint.x, mousePos.y - screenPoint.y); float angle = Mathf.Atan2(offset.y, offset.x) * Mathf.Rad2Deg; angle -= 90; // Adjust the angle by 90 degrees transform.rotation = Quaternion.Euler(0, 0, angle);
@dusklightcreations3951
@dusklightcreations3951 Год назад
You working on 2d top down series is helping me to work on some mechanics for little adventure I hopped into.
@MuddyWolf
@MuddyWolf Год назад
Awesome! I'd love to see it when you finish it!
@cactistudios8406
@cactistudios8406 Год назад
Thanks for making my suggestion so quickly. Very impressive.
@MuddyWolf
@MuddyWolf Год назад
Hey if you ask, you get it!! Thanks for watching!
@SkorpionYassine
@SkorpionYassine 8 месяцев назад
Great vid
@doggo2031
@doggo2031 6 месяцев назад
I have a question, in your demonstration, your sword swings in the direction of your mouse, when I used it, it would swing in the set direction. IS there any fix to this?
@syfenw6586
@syfenw6586 11 месяцев назад
Hi, i have a problem with the sword animations when i attack it only goes halfway the animation
@jezreelmarkbarrameda8287
@jezreelmarkbarrameda8287 6 месяцев назад
mine can only attack on one side and i dont know how to fix it
Год назад
I loved the video, hello friend, can you guide me with something, I'm making a combo of attacks from a 2d game but the character has 8 directions and in each direction it has an animation that I want to turn into a combo of attacks when clicking release several attacks, you can guide me. I understand that it is with events in the animations. thank you so much
@AquaTwist_
@AquaTwist_ 4 месяца назад
Unfortunately since my game doesn't use the mouse I had to create a Blend Tree to properly rotate the animation depending on the direction the player is facing, like how you would with a Walking blend tree. Great video regardless, it was very helpful! :)
@genius4426
@genius4426 Год назад
Hi! This is actually a request from your previous bow combat tutorial but I’m posting it here to make sure you see it! So I really need some help, I’m struggling to make it so that instead of the bow and arrow shooting at the direction of your mouse, it shoots *depending on the arrow key you press.* So that means pressing the up arrow key would make it to shoot up, the down arrow key would make it shoot down, Left arrow key would shoot it left and etc. *_Of course you’d have to consider making the bow rotate before the arrow shoots too._* Please would you be able to help me with the code for this? I’m very new to unity and I’ve been stuck doing this for days now
@XulinBr
@XulinBr 6 месяцев назад
BRO HOW THE SWORD IS GOING WITH YOUR MOUSE POSITION
@scoliosis430
@scoliosis430 11 месяцев назад
Everything here is perfect, but I have a question, in your demonstration, your sword swings in the direction of your mouse, when I used it, it would swing in the set direction. Can you tell me what I'm doing wrong please?
@ginocarlo7724
@ginocarlo7724 10 месяцев назад
Same thing here
@TheAnimatedSquare
@TheAnimatedSquare 25 дней назад
PLEASE SOMEONE HELP HERE, IM HAVING THE SAME PROBLEM TOO!
@yume3879
@yume3879 5 месяцев назад
niceeeeee
@gececiyim87
@gececiyim87 Год назад
hello, when I click the mouse, the sword swings from the same place. So it doesn't shake in the direction of the mouse. What is the reason?
@csongorbalassa5724
@csongorbalassa5724 Год назад
I am having the exact same problem right now, did you manage to solve it? Or anyone?
@moronji4755
@moronji4755 Год назад
I am also having the same problem did you figure out how to fix it?
@Basil13ful
@Basil13ful Год назад
same probleme here
@ginocarlo7724
@ginocarlo7724 10 месяцев назад
same here
@Space_Masters
@Space_Masters Год назад
Good video! I noticed the trail looks like it's still zipping back to the start position at the end of the swing. How do you prevent that?
@MuddyWolf
@MuddyWolf Год назад
Hmm good point, the ideal solution would be to keep the sword at the end of the swing once finished, I'm sure you can set the animation to end and keep the position 🤔 I'll do a Google and write a comment if I find the solution
@thegamingcuber6262
@thegamingcuber6262 Год назад
I know this is late, but what I did to fix this was end the trail effect 1 frame before I stopped moving the sword in the animation.
@yume3879
@yume3879 5 месяцев назад
for the sword to swing in the mouse position mousePos = cam.ScreenToWorldPoint(Input.mousePosition); float angle = Mathf.Atan2(mousePos.y-transform.position.y, mousePos.x-transform.position.x) * Mathf.Rad2Deg - 90f; transform.localRotation = Quaternion.Euler(0, 0,angle); add this to playerinput
@obi_ladd1405
@obi_ladd1405 4 месяца назад
this also rotates the player.
@dusklightcreations3951
@dusklightcreations3951 Год назад
So have you consider to to work on in game shop system,like having npc to trade with or something similar.
@MuddyWolf
@MuddyWolf Год назад
Hell yeah! Do you mean like a Minecraft style trade?
@dusklightcreations3951
@dusklightcreations3951 Год назад
@@MuddyWolf yeah, could think of like that
@syfenw6586
@syfenw6586 11 месяцев назад
how can i make it so i get to next level when all enemies are killed
@alecoppeac
@alecoppeac 10 месяцев назад
make 2 int variables: "killcount" and "necessaryKillcount", set the first to 0 and the second to the number of enemies. Increase "killcount" by +1 on any enemy death. On update check if necessaryKillcount=killcount and if it does load the next scene
@PatientRock
@PatientRock 9 месяцев назад
Good video, but you left out the part where the sword attack changes direction with the mouse.
@aryan6201
@aryan6201 7 месяцев назад
how do you fix this?
@outhander3941
@outhander3941 6 месяцев назад
this is an interesting idea but should framerate fall and you won't hit anyone
@ITSADREX
@ITSADREX Год назад
idk what to do mine is only swinging once and that's it, i have to restart the game but it still does the same thing
@Timo-gj5qq
@Timo-gj5qq Год назад
I have the same problem...
@csongorbalassa5724
@csongorbalassa5724 Год назад
@@Timo-gj5qq same here, did someone manage to work around it?
@MellyTing
@MellyTing Год назад
same
@MuddyWolf
@MuddyWolf Год назад
Sorry you're all experiencing this! If any of you want help fixing it feel free to jump on my discord server and create a post in the forum and I'll try help out!
@kastordark___
@kastordark___ Год назад
@@MuddyWolf why cant you tell here?
Далее
2D Smooth Camera Follow in Unity Tutorial
6:34
Просмотров 7 тыс.
Creating SMART enemies from scratch! | Devlog
5:40
Просмотров 296 тыс.
Викторина от МАМЫ 🆘 | WICSUR #shorts
00:58
I Made the Same Game in 8 Engines
12:34
Просмотров 4 млн
Improving Combat with Spells! | Devlog
5:50
Просмотров 52 тыс.
Escaping Unity Animator HELL
18:18
Просмотров 501 тыс.
2D Top Down Movement UNITY Tutorial
7:21
Просмотров 219 тыс.
Easy 2D Melee Combo System in Unity: Tutorial
11:13
Просмотров 81 тыс.
2D EFFECTORS in Unity - Tutorial
11:26
Просмотров 301 тыс.
10 Minutes vs. 10 Years of Animation
19:29
Просмотров 744 тыс.
Modern Wood Rifle / Woox Furiosa Ultra
0:30
Просмотров 8 млн