2D Melee in Unity Tutorial

  Рет қаралды 14,211

Muddy Wolf

Muddy Wolf

Жыл бұрын

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

Пікірлер: 45
@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! 💪
@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!
@DragoTheSpider
@DragoTheSpider Ай бұрын
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);
@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 7 ай бұрын
Great vid
@doggo2031
@doggo2031 5 ай бұрын
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?
@scoliosis430
@scoliosis430 10 ай бұрын
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 8 ай бұрын
Same thing here
@AquaTwist_
@AquaTwist_ 2 ай бұрын
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
@syfenw6586
@syfenw6586 10 ай бұрын
Hi, i have a problem with the sword animations when i attack it only goes halfway the animation
Жыл бұрын
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
@jezreelmarkbarrameda8287
@jezreelmarkbarrameda8287 4 ай бұрын
mine can only attack on one side and i dont know how to fix it
@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.
@XulinBr
@XulinBr 4 ай бұрын
BRO HOW THE SWORD IS GOING WITH YOUR MOUSE POSITION
@yume3879
@yume3879 3 ай бұрын
niceeeeee
@PatientRock
@PatientRock 8 ай бұрын
Good video, but you left out the part where the sword attack changes direction with the mouse.
@aryan6201
@aryan6201 5 ай бұрын
how do you fix this?
@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
@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 8 ай бұрын
same here
@yume3879
@yume3879 3 ай бұрын
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 3 ай бұрын
this also rotates the player.
@outhander3941
@outhander3941 5 ай бұрын
this is an interesting idea but should framerate fall and you won't hit anyone
@syfenw6586
@syfenw6586 9 ай бұрын
how can i make it so i get to next level when all enemies are killed
@alecoppeac
@alecoppeac 8 ай бұрын
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
@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
Muddy Wolf
Рет қаралды 6 М.
2D Top Down Movement UNITY Tutorial
7:21
BMo
Рет қаралды 214 М.
When someone reclines their seat ✈️
00:21
Adam W
Рет қаралды 17 МЛН
They RUINED Everything! 😢
00:31
Carter Sharer
Рет қаралды 11 МЛН
Easy 2D Melee Combo System in Unity: Tutorial
11:13
ChosenPlay
Рет қаралды 79 М.
Modular Combo System for Combat in Unity
20:29
The Game Dev Cave
Рет қаралды 29 М.
How to make object Follow Mouse position and aim in unity
2:00
Grafik Games
Рет қаралды 11 М.
2D EFFECTORS in Unity - Tutorial
11:26
Brackeys
Рет қаралды 300 М.
Improving Combat with Spells! | Devlog
5:50
Challacade
Рет қаралды 48 М.
TOP DOWN MOVEMENT in Unity!
22:30
Brackeys
Рет қаралды 1,2 МЛН
2D ENEMY Melee Combat in UNITY - Setting Up Character - Part 1
10:01
Sid Makes Games
Рет қаралды 77 М.
How to make 2D GLOW in Unity!
15:56
Brackeys
Рет қаралды 582 М.
СИМВОЛИЧНОЕ ИСКУССТВО
0:28
В ТРЕНДЕ
Рет қаралды 2,5 МЛН
Sigma girl don’t think about stray animals😔
0:35
mountainlion5
Рет қаралды 12 МЛН