Unity Top Down Shooting Animation with Blend Tree Part 1 - Tutorial

  Рет қаралды 18,827

CouchFerret makes Games

CouchFerret makes Games

Күн бұрын

Пікірлер: 42
@CouchFerretmakesGames
@CouchFerretmakesGames 5 жыл бұрын
*Hey everyone!* 👏 👏 I'm happy to announce our community *Discord server* , come and *join us* : discord.gg/dac7sr2 And also, you can get all the *Sprites* and *Project Files* by supporting me on *Patreon* : www.patreon.com/CouchFerret
@rashidfarhan6223
@rashidfarhan6223 6 жыл бұрын
been binge watching your videos, love your content bro
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
Thanks, I really appreciate it! ^ - ^
@chengc1049
@chengc1049 6 жыл бұрын
awesome videos. please keep it coming!
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
Thanks! I'm on it. :)
@insideman7501
@insideman7501 6 жыл бұрын
Very nice commentary! I subscribscribed and I'm going to try this today!
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
I'm happy to hear that! Thanks! :)
@CHYMMUTH
@CHYMMUTH 6 жыл бұрын
Your chanel is very underrated
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
Thank you! ^ - ^. But it's growing pretty neatly :)
@kiwioverlord9519
@kiwioverlord9519 6 жыл бұрын
Could you explain how to test if two objects are touching without physics? thanks :)
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
Hey, I'm sorry for answering slowly, I had to try it out. I'm planning to have multiple tutorials on this, but until then I give you an example of it. The only way I've found is that one of the touching objects needs to have a rigidbody(2D) component in it to make it work. However, you can set the rigidbody to be Kinematic, meaning that it won't get affected by other physical objects or forces. It's a parameter of the component, in case of 3D it's a checkbox named "Is Kinematic", and in case of 2D it's a dropdown field named "Body Type". So a 3D example would look like this: Create two objects, let's say one of them is the Wall the other is the Player. Give both of them a Collider, and set the Wall Collider's "Is Trigger" parameter to True. Then, give the Player object a Rigidbody Component and check its "Is Kinematic" parameter to true. Now, if you create a script and add it to the Player, then you can use the following Trigger functions to detect if they are touching or not: (They are like the Update function but only called when touching happens) - OnTriggerEnter: Is called once when they start touching - OnTriggerExit: Is called once when they stop touching - OnTriggerStay: Is called when they are continuously touching. A 2D version would look like this: Create two sprites, let's say one of them is the Wall the other is the Player. Give both of them a Collider2D, and set the Wall Collider's "Is Trigger" parameter to True. Then, give the Player object a Rigidbody2D Component and set it's Body Type to Kinematic. Now, if you create a script and add it to the Player, then you can use the following Trigger functions to detect if they are touching or not: (They are like the Update function but only called when touching happens) - OnTriggerEnter2D: Is called once when they start touching - OnTriggerExit2D: Is called once when they stop touching - OnTriggerStay2D: Is called when they are continuously touching. You can find pretty good example usages on these function in Unity's official Documentation. Just google for "unity OnTriggerEnter2D" and usually I'm using the "Unity - Scripting API" pages. I hope this helps, let me know if something is not okay. Cheers!
@kiwioverlord9519
@kiwioverlord9519 6 жыл бұрын
There's no need to apologize for answering slowly, any answer is greatly appreciated! Also, it works perfectly, thank you!
@wamballa5948
@wamballa5948 4 жыл бұрын
Love your videos! Just say your character has 3 types of bow. You would need to just do 3 times the number of top sprites? One for each bow type?
@cagataybalkc6680
@cagataybalkc6680 5 жыл бұрын
Great tutorial man but I have some problems with main archer game object. Bottom part and upper part have their own animator but parent gameobject archer needs one. My second problem is my bools won't exist. I think that it is connected with problem one.I have two bools as running and walking. They were working with Keith but now they won't. Can you help about this problem. thanks man again for this great tutorial.
@Fedexmaster91
@Fedexmaster91 6 жыл бұрын
Hello there, Great tutorial man I'm really Enjoying following. Thanks for your work! Btw there is any link to the projects files or to the sprite sheet?
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
You're welcome! I can send you back the Sprites if you drop me an email. You can find my address at my channel's About page. I need to find some time to set up a website or something.
@Fedexmaster91
@Fedexmaster91 6 жыл бұрын
@@CouchFerretmakesGames I just sended you an Email then ^-^
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
@@Fedexmaster91 I've sent them back to you. Have fun! :)
@brandonluhrs
@brandonluhrs 6 жыл бұрын
@@CouchFerretmakesGames hey bro, can u send me the sprites too? im working on a proyect following your tutorial. My email is brandonluhrs@gmail.com
5 жыл бұрын
1:47 is this a pewdiepie game? :D
@CouchFerretmakesGames
@CouchFerretmakesGames 5 жыл бұрын
Yes, and it's only 399$!!! *(legs sold separately)
@kiwioverlord9519
@kiwioverlord9519 6 жыл бұрын
Ok so I have a beginner question: I have a health bar that I want to stay under my robot at all times. The problem is, if I just set the health bar as a child object, the health bar will turn when my robot makes turns and I just want it to stay flat under my character. Instead of setting it as a child object, how do I continuously transform the health bar's position so that it always stay under my robot?
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
You could make a small script for the health bar and set its position to your robot's position (maybe offset a bit as well by adding a constant vector to it) in the Update() function so it updates every frame. Let me know if you have troubles with this. :)
@kiwioverlord9519
@kiwioverlord9519 6 жыл бұрын
There was no trouble, everything worked out perfectly. Thanks!
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
@@kiwioverlord9519 Awesome!
@nutsquirrel84
@nutsquirrel84 5 жыл бұрын
i love how fast u explain everything but we dont know the order of the sprites dude. after placing bottom left down sprites what comes later? after then what comes? cuz it s hard to understand from inside the unity.
@MrSteamLp
@MrSteamLp 5 жыл бұрын
did you find a solution to this? im doing it myself right now and i got problems figuring out the right order.
@nutsquirrel84
@nutsquirrel84 5 жыл бұрын
@@MrSteamLp check 4:48 mate. İf u need help come to discord channel.
@MrSteamLp
@MrSteamLp 5 жыл бұрын
@@nutsquirrel84 Thanks alot!
@kiwioverlord9519
@kiwioverlord9519 6 жыл бұрын
Ok so I have a robot with a gun on its right arm. When I press fire, It shoots a bullet from its center, but I want the bullet to be fired from a bit to the robot's right side no matter which way it is facing so it will look like the bullet shot out of its gun instead of its body. How do I do this? Also, there's no need to rush to answer me, I understand if you're busy!
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
Hi, you have a few pretty good questions. :) This is also on the roadmap to make a video of. You could change the starting position at the Instantiate function, it's the second argument. I had this in my code: GameObject arrow = Instantiate(arrowPrefab, transform.position, Quaternion.identity); So to change this to not have the projectiles spawn at different location than the center of the Player, you can add something to the transform.position like this: Vector3 offset = new Vector3(0.5f, 0.0f, 0.0f); GameObject arrow = Instantiate(arrowPrefab, transform.position + offset, Quaternion.identity); This will move the spawn point of the bullet a bit to the right. However, I will be using a dynamic solution which will add a small portion of the Crosshair's local position (relative to the Archer) to the bullet's spawn point, so it's changing depending on which direction the Archer is aiming.
@kiwioverlord9519
@kiwioverlord9519 6 жыл бұрын
Thank you, I ask good questions, but you give great answers :D. Also, I found a kind of crude way to make it work; you create another sprite, set that sprite as the transform.position, make the sprite a child object of the robot, and adjust the position until it is above the right arm where you want it. Then set the scale to 0 so you can't see it, and it works perfect!
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
@@kiwioverlord9519 Nice trick! I'm glad you are coming up with your own solutions. :) Instead of setting the scale to 0, you can just remove the Sprite Renderer component in the Inspector window. There's a little gear icon at the top right corner of all components. Or you could just Create Empty Gameobject instead of a Sprite.
@kiwioverlord9519
@kiwioverlord9519 6 жыл бұрын
The empty gameobject works, thanks! Also, i'm having a simple issue with my sprites, basically the edges get distorted and pixelated when I try to scale my sprites. How do I improve the quality of the sprites?
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
@@kiwioverlord9519 I'm sorry, I've missed this question of yours. I'll look into this, and keep you updated!
@Luk3r
@Luk3r 5 жыл бұрын
He says "we grab the spritesheet from the last video but there is no video of him making the spritesheet? Did it get deleted or something?
@connor2094
@connor2094 6 жыл бұрын
Hello my friend. Can i easyli make it a gun instead of a bow and mabye make a shop to buy better weapons after each zombie round? I now it's hard and mabye some AI in the zombies, but if you know how, plz help
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
You could replace the bow to a gun for sure. And for the AI, I'll have tutorials on that, but it might take a while to get there with this game.
@connor2094
@connor2094 6 жыл бұрын
@@CouchFerretmakesGames i want to make a BOXHEAD THE ZOMBIE WARS. The key to the game is that u can build your own base, and mabye zombies drop the materials
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
@@connor2094 Sounds like a pretty neat game!
Unity Top Down Shooting Animation with Blend Tree Part 2 - Tutorial
8:14
CouchFerret makes Games
Рет қаралды 12 М.
3 Months of Learning Game Development
10:48
byte of michael
Рет қаралды 974 М.
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
Unity Top Down Colliders and Character Movement - Tutorial
8:32
CouchFerret makes Games
Рет қаралды 200 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
6 Years of Learning Game Development
17:20
Cobra Code
Рет қаралды 267 М.
Every 2D Node Explained in 9 Minutes !
9:19
Lukky
Рет қаралды 390 М.
Unity Top Down Level Design with Grids and Sorting Order - Tutorial
10:51
CouchFerret makes Games
Рет қаралды 129 М.
Unity Shooting Arrows in Top Down Perspective Part 2 - Tutorial
5:32
CouchFerret makes Games
Рет қаралды 22 М.
The Best FREE Software for Game Development! (In my Opinion)
11:06
How I Made a 3D Platformer in 2D Game Engine
21:23
ggenije
Рет қаралды 581 М.
choosing a game engine is easy, actually
15:08
samyam
Рет қаралды 643 М.
TOP DOWN MOVEMENT in Unity!
22:30
Brackeys
Рет қаралды 1,2 МЛН