Unity Top Down Colliders and Character Movement - Tutorial

  Рет қаралды 199,931

CouchFerret makes Games

CouchFerret makes Games

Күн бұрын

Пікірлер: 161
@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
@albingrahn5576
@albingrahn5576 6 жыл бұрын
I love the pixel drawings that explain things!
@Kapteeni40
@Kapteeni40 3 ай бұрын
This is the best movement + collision tutorial on KZbin, I swear! It has examples, illuminating art; everything!
@jacktjong1266
@jacktjong1266 5 жыл бұрын
Just wow. I've searched land and sea for a way to create sturdy colliders that do not rely on overlapping to create a solid border and never have I ever found the words "composite collider" anywhere. This changes my entire game plan. Thanks for the tutorial.
@basedbartholomew3968
@basedbartholomew3968 5 жыл бұрын
My Opinion: These 2d Top Down Games Are One of The Best Styles. I don't Know Why So Many People Hate it
@CouchFerretmakesGames
@CouchFerretmakesGames 5 жыл бұрын
I agree!! I don't know either. :D
@CulturalToast
@CulturalToast 5 жыл бұрын
Love your "webcam" and new style of explaining
@mayankkela8485
@mayankkela8485 5 жыл бұрын
CouchFerret you are a professional Developer who simply work And couch easily You are a nice Developer
@CouchFerretmakesGames
@CouchFerretmakesGames 5 жыл бұрын
Thank you! :)
@BrandonMerrington
@BrandonMerrington Ай бұрын
Sometimes its the simple things that cause the biggest issues. My player rotation not being constrained was making my player drift on collision. Thank you for the help.
@BenanaBoy
@BenanaBoy 4 жыл бұрын
Seriously underrated channel
@jemma.maurice
@jemma.maurice 5 жыл бұрын
This ain’t quality content This is high quality content
@rickygr97
@rickygr97 3 жыл бұрын
i think this is one of the best explanations there is on youtube for explaining colliders thank you
@kodo777
@kodo777 6 жыл бұрын
Dude, you only have 1.5k subs??? The quality of your vids equate to more!
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
It's 1.6k now! :D Thanks man! I think I'm growing in a healthy manner. :)
@TheAncester
@TheAncester 6 жыл бұрын
Nice new addition with the 8bit ferret and accommodating description visuals man!
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
Thank you! :) I wanted to make it a bit more entertaining.
@hauntedcrowdev
@hauntedcrowdev 10 ай бұрын
I was struggling a bit with this! Thanks for this guide!
@phi6669
@phi6669 5 жыл бұрын
thx man, I sat in my chair almost with tears in my fckn eyes cause I have to show my Project to my teacher in a few days and i was so done with my life lol
@BulkyDookieVODS
@BulkyDookieVODS Жыл бұрын
This Video Saved Me!!! I've been trying to figure out how to collide a "Character" to other GameObjects using a Non-Physics "Transform" method in script. I didn't know you could use RigidBody2D like this LMAO!!!!!
@hulm
@hulm 6 жыл бұрын
Man, I am just happy for finding this channel 😃
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
I'm happy too! 😃Welcome to my channel!
@aryaiskandarsyah
@aryaiskandarsyah 6 жыл бұрын
thank you so much, your channel is beginner friendly :D. and you did alot of edit on your character on the screen. this channel must become popular like brackeys :D
@dani1996dani
@dani1996dani 5 жыл бұрын
I struggled with jittery movement even after using a physics calculation on the rigidBody of the player for hours - watched this video and I finally realized I needed to use a CIRCLE collider instead of a BOX collider for the player. Thanks for the video, its a good one :)
@filip380PL
@filip380PL 2 жыл бұрын
You don't have to
@tiger_serzh
@tiger_serzh 3 жыл бұрын
Hello from Russia! And thanks for your lessons!
@pratikdhanawate8648
@pratikdhanawate8648 2 жыл бұрын
Really helped in solving the problem that got me stuck on not one but two games
@xkondi5434
@xkondi5434 6 жыл бұрын
You put your heart into your videos, because of that it feels awesome to watch them and learn from them too :)
@nivmiz0
@nivmiz0 4 жыл бұрын
THANK YOU SO MUCH! The phantom vertices were annoying me in my game, so I watched this and it's completely fixed now!
@alizaidi5610
@alizaidi5610 4 жыл бұрын
Severely under rated channel. Keep up the great videos.
@viz.9649
@viz.9649 2 жыл бұрын
Thanks for the clean tutorial, man. Saved my future
@a_soulspark
@a_soulspark 6 жыл бұрын
The little 2D Ferret is lovely! Also, how hard would it be to add jumping in this game?
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
Hey, thanks! :) Well, it depends on what kind of jumping you are talking about. If it's a tumble like dodging arrows fast, then it's pretty easy and I'm planning to do that. However, I have a feeling you are thinking about real jumping like between platforms an such. It remains simple as long as the overall world of the game is flat. Like in this game, the map is flat and there are no hills, the "terrain" is flat. But if you want to have hills or platforms that are taller to jump in between them, then it becomes very cumbersome in this game's full 2D solution. And I would recommend a 3D isometric solution with the same sprites. You couldn't tell the difference in looks. It's a bit harder to implement the basic mechanics but handles the 3D space way better (because it's literally 3D) so any kind of jumping would be possible to implement. All in all, if your jumping remains in a flat world then it's easy, but if it requires upwards and downwards motion in a 3D space like in Monument Valley, then this 2D solution makes it hard and not feasible.
@TheIslandIdiot
@TheIslandIdiot 4 жыл бұрын
you deserve more subscribers and views! this is great!
@JoaoAntonioCardoso
@JoaoAntonioCardoso 5 жыл бұрын
The composite collider is really a great technique that I didn't know - could save a lot of trouble... haha very good videos!
@CouchFerretmakesGames
@CouchFerretmakesGames 5 жыл бұрын
I've found it not long ago, such a great component. :P Solves all the previous problems.
@paulalexandercruzesteves576
@paulalexandercruzesteves576 3 жыл бұрын
Good video is just what I was looking for , thanks :D
@YeastyPasta
@YeastyPasta 5 жыл бұрын
dude this was EXACTLY what i needed for my project thank you so much
@ldvata7609
@ldvata7609 10 ай бұрын
Earned a sub
@edsu7898
@edsu7898 3 жыл бұрын
thank you very much your a great game dev
@ethanchien2511
@ethanchien2511 5 жыл бұрын
Love your channel! So helpful for beginners like us! Thank you so much for uploading!
@iansong1676
@iansong1676 6 жыл бұрын
Another awesome video! I love you little animations on the side. Also thank you so much for going over Time.deltaTime! It really helps me a lot.
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
I'm glad you liked it. ^ - ^ I think I'll mention Time.deltaTime and stuff like Update() FixedUpdate() more in the future. They are just such frequently used things.
@milanstevic8424
@milanstevic8424 6 жыл бұрын
when you get the hang of it I'd also recommend writing your own wrapper for the delta time in general. that'll put you in much more control over the time flow in your game. as an example, while setting time scale to 0 is useful to pause the game, it would also freeze all of your animations in place (because they rely on this scaled delta time), and you'd probably want to keep some of them in your pause menu. you could also use the so called unscaled delta time, but oh boy, rolling your own is always much more handy. and can be fun as well.
@freemind.d2714
@freemind.d2714 5 жыл бұрын
watch so many video, this one finally helped
@redhawkrobin
@redhawkrobin 2 жыл бұрын
This was a pretty awesome tutorial!
@Alex_ADEdge
@Alex_ADEdge 3 жыл бұрын
Great tutorial, cleared up a couple of nagging questions I had about composite colliders. Took the collider count in game down from 1000+ to 10, so quite the improvement as you could expect! XD
@nasym909
@nasym909 5 жыл бұрын
Thanks for everything you helped me a lot can you do more tutorials top down about jumping thanks again
@TheHobbit28
@TheHobbit28 6 жыл бұрын
Great Vid! Like your style of presentation a lot
@LordnachCTM
@LordnachCTM 5 жыл бұрын
Why is this channel so hidden from the world, damn you YT for not showing me this before
@kjp312
@kjp312 5 жыл бұрын
Helped me a lot
@narrenschlag
@narrenschlag 5 жыл бұрын
That is so great. Why haven't I found you earlier :D
@CouchFerretmakesGames
@CouchFerretmakesGames 5 жыл бұрын
Thanks! I’ve been playing hide and seek on KZbin, that’s why. :D
@krisitak
@krisitak 4 жыл бұрын
Thank you, high quality stuff.
@sgt2615
@sgt2615 6 жыл бұрын
This helped me so much, Thanks
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
I'm glad it helped! :)
@faithmorante
@faithmorante 2 жыл бұрын
This helped me alot thanks!!
@betrayedpickle291
@betrayedpickle291 2 жыл бұрын
thanks, this was SUPER useful
@tiskolin
@tiskolin 5 жыл бұрын
Why add a rb? Isn't just a collider enough...?
@CouchFerretmakesGames
@CouchFerretmakesGames 5 жыл бұрын
Yep, it should be enough to just put an rb on the player and do the walls without one. I think I'll dedicate a whole episode to the collision matrix in Unity and I'll fix this then. Thanks for pointing it out though! :)
@mayankkela8485
@mayankkela8485 5 жыл бұрын
Thanks you solved it my typical problem
@anselmadsen3348
@anselmadsen3348 6 жыл бұрын
you are the new brackeys my friend
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
:D Thanks! :D
@kamilniezorawski7244
@kamilniezorawski7244 6 жыл бұрын
Great tutorial, thank you
@SixGunsTV
@SixGunsTV 5 жыл бұрын
thanks for ur amazing help!
@Eragarev
@Eragarev Жыл бұрын
I never knew about the composite collider thing.
@kamilstudios
@kamilstudios 3 жыл бұрын
Awesome tutorial!
@RELOADEDhub
@RELOADEDhub 4 жыл бұрын
thanks its really helpful for me in my project ..
@clapper2564
@clapper2564 3 жыл бұрын
You're the best!!!!!
@javiaguilar1156
@javiaguilar1156 5 жыл бұрын
Very well explained tutorial. Could you make a follow-up tutorial on how to restrict the player movement to the grid? Like in old games like Pokemon Gold and Silver, where each time you press a direction the player moves exactly 1 cell in that direction. Thank you
@WolfieMoonDev
@WolfieMoonDev 3 жыл бұрын
Would you be able to do vs code tutorials to?
@WoThFal
@WoThFal 5 жыл бұрын
Hey! Thanks for the tutorials! i really enjoyed watching them and learning something :0 i have a question and that is how do you make a character jump in a top down game? I've been looking for it in a lot of places but haven't founded the answer. I dont know if you could make a video or guide me to the materials i need do it.! Thanks!!
@CouchFerretmakesGames
@CouchFerretmakesGames 5 жыл бұрын
Hey! :) Well, it depends on what kind of jumping you are talking about. If it's just a simple jump like jumping over a fence, then it isn't that difficult, just a few tweaks with the colliders for a short amount of time to let the character go through the fence. However, I have a feeling that you are thinking about jumps between platforms and such. The thing is that it remains simple as long as the overall world of the game remains flat game mechanics wise. For example in this game the map itself is flat, there are no hills. But if you want to make the character jump between platforms with various heights and fall if he fails to jump long or high enough then a 2D solution like this game have will be tough. I would recommend making your game in 3D isometric perspective but using 2D sprites to still keep the 2D feeling. In 3D you can simulate the correctly the positions and not just fake the third dimension like I did in this game. However, if your platforms and the ground remains flat in your game, and you only have a flat surface with holes in it, then that could be managed in this 2D solution. Hope I make sense! :D Let me know your plans in detail so I can suggest a solution for it. Like reference existing games, or describe the limits of the system, so we can decide that a 2D solution works for you or it would be wiser to switch to a 3D but 2D looking game. :) Cheers!
@WoThFal
@WoThFal 5 жыл бұрын
@@CouchFerretmakesGames Thanks for your response! Looks like im going to make it flat then! haha, You caught me, i was thinking in simulating that kind of 3D. Mostly for pits or cliffs so the player can jump them down, (just like in Hyper light drifter or in CrossCode) However i dont think im going to add it, but the curiosity got me to ask you. Thanks again for your time to answer me. it really helped me a lot!
@xxashleythefoxx6765
@xxashleythefoxx6765 5 жыл бұрын
Thank you your a Lifesaver
@Moon-to9se
@Moon-to9se 2 жыл бұрын
Thank you so much!
@mayankkela8485
@mayankkela8485 5 жыл бұрын
Thanks you couchFerred
@ano7371
@ano7371 3 жыл бұрын
At 5:53 how to implement that in game side-scrolling
@LarS22730
@LarS22730 5 жыл бұрын
fantastic tutorial man! great improvisation when explaining. maybe next time you need to make more lil bit entertainment in the tutorials like a joke or something to make it not too boring 👌
@CouchFerretmakesGames
@CouchFerretmakesGames 5 жыл бұрын
Thanks! Yeah, I'm thinking about the entertainment part of the video a lot. I don't want to have you guys to fall asleep. :D But because I write the scripts for the voiceover beforehand, and I'm not an actor :D the little jokes doesn't really end up being good in the end. I plan to go off script soon, let's see how it will go. :)
@LarS22730
@LarS22730 5 жыл бұрын
@@CouchFerretmakesGames heck yea, gdluck with that ' w')b
@게임개발흥미
@게임개발흥미 5 жыл бұрын
amazing!!
@Andrew90046zero
@Andrew90046zero 5 жыл бұрын
Why do the walls need a kinematic rigid body? If they are static, wouldn't they not need to move? Or does giving them kinematic bodies help with something? EDIT: I noticed you eventually removed them, but you then had to put a rigidbody in the grid object, which is still a bit odd.
@CouchFerretmakesGames
@CouchFerretmakesGames 5 жыл бұрын
You are right! The individual walls didn't need to be kinematic they could have remained as static objects. I messed it up, I'll make sure to have a dedicated episode on the collision matrix to sort this out once and for all. :) Thanks for pointing it out! Odd, I know, but the CompositeCollider requires a RigidBody2D component. It was strange for me as well and I tried to remove it, but no luck.
@MycoalD
@MycoalD 4 жыл бұрын
thanks, this helped!
@vsr3276
@vsr3276 6 жыл бұрын
Great tutorial series! I have a question tho, will you make this online multiplayer or local? I subbed to you btw
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
I only have plans for local multiplayer. It would be fun to have online multiplayer, but it would take a lot of time to get it right, and with that time I could develop the next game instead. :) Thanks for the sub, and welcome to my channel! ^ - ^
@henrymontalvo384
@henrymontalvo384 2 жыл бұрын
How do you make it so the player can appear above the wall when below it and behind it when above in 2D?
@ethanbeers7497
@ethanbeers7497 2 жыл бұрын
how do i get my character to be behind the object when he moves behind it instead of just walking thru it. im talking about outside of the box collider but supposed to be behind the object
@DebugFrog
@DebugFrog 5 жыл бұрын
Hello, your tutorials are fantastic!! I've been working on a top down 2D game and I was wondering if you'd be able to answer a question? :) I've followed yours and many other's tutorials for getting solid collisions with walls working, but no matter what I do, my character slides right through the colliders. I have rigidbody and colliders set up with is trigger unchecked, my character has a rigidbody and a collider, i've even checked that the player isn't moving too fast for the collider to detect - everything seems like it should be working, but it just isn't. Thanks so much for your videos!!
@linguinelabs
@linguinelabs 4 жыл бұрын
Did you find a solution?
@toaster-chan7386
@toaster-chan7386 3 жыл бұрын
Hey so like, I might need some help. So with my top-down game, I can't seem to get the walls working right, how do I get it to look like my character is going behind the wall? When the player walks in front of it, the layers work fine, but I can't get him to walk behind it without still appearing on top.
@heytheremogwai
@heytheremogwai 4 жыл бұрын
I have a sprite with a box collider, and I have a tree with a poly collider. Collision is detected, but my character sprite also pushes the tree around. How do I make it so that the tree doesn't get pushed around?
@wowvain2989
@wowvain2989 4 жыл бұрын
Hey man! I have a question that apperantly no one else answered on forums and such. When I collide with a wall from the front, everything works fine and my characters shows above the wall, like it should, but when i collide with a wall from behind, my character still shows over the wall because its sorting layer is above the wall. How do I fix this? Is there a script or a setting i've overseen?
@samu3lp88
@samu3lp88 4 жыл бұрын
make player and walls layer = position.y
@ramicky16
@ramicky16 5 жыл бұрын
Hello! Thank you for your work! I have a question though :o What about a body of water.. I don't want it to kill the player I wanted it to block the player just like a wall.. but The player is supposed to open a bridge that goes through the water.. do i make 2 separate game objects for the water with different colliders or is there a smarter way?
@CouchFerretmakesGames
@CouchFerretmakesGames 5 жыл бұрын
I think I would go for the 2 separate game objects, or even 3. The third one begin the bridge which will be turned of if the player has opened the bridge.
@The5thAstronaut
@The5thAstronaut 5 жыл бұрын
my player has a rigidbody2d and box collider while my 'buildings' tilemap has the tilemap collider 2d, but my player still walks over the building tiles. Is there anything else I should watch out for? Or something I'm missing? They're both on the same sorting later, and the same blocking layer and my players body type is kinematic.
@tony_gvrd
@tony_gvrd 2 жыл бұрын
mine too :(
@siddharthsen4475
@siddharthsen4475 6 жыл бұрын
Thanks
@clementiine4422
@clementiine4422 6 жыл бұрын
is there anything i can use other than unity?
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
Godot is a good and free alternative, but you could use most of the game engines out there probably.
@clementiine4422
@clementiine4422 6 жыл бұрын
ok thanks!
@jackripper7578
@jackripper7578 3 жыл бұрын
My respect
@Mythorian
@Mythorian 6 жыл бұрын
How to make it so the animation stops when walking into a collision?
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
That's a tough one, but pretty cool idea. I'll think about it to have it in the game. Thanks! We could achieve that with collision detection functions like OnCollisionEnter2D, and with a new animation parameter. However, I think the main struggles with this would be to find out that the character actually running into the walls or just running near the walls.
@milanstevic8424
@milanstevic8424 6 жыл бұрын
@@CouchFerretmakesGames (didn't watch the video yet but) the animation should stop only when the character velocity stops. if the character sprite stops due to hitting a collider (velocity = 0), its animation should also stop (animation = 0). if it doesn't stop (velocity > 0), the character is either sliding along the edge of the collider or not hitting the collider at all, so the animation shouldn't stop as well (animation > 0). the result will look natural, and the game will play as expected, with no major changes (not even OnCollision events are needed). you already have the case where velocity = 0 and animation > 0, which is basically the idle animation. (if you don't have it already, it's well supported anyway), and the only case where you want the case of velocity > 0 and animation = 0 is if you want to have a character fly off due to damage (maybe bounce in the air slightly like a ragdoll) or some other physical force that might act on him (you know, like spring traps etc). in that case the walking animation might appear uncanny, simply because his legs are detached from the ground, and in general, this is how you convey the notion of an involuntary movement in such games (if no other animation is dedicated to this context).
@JulioCsw
@JulioCsw 6 жыл бұрын
Just epic =D
@Exorion1er
@Exorion1er Жыл бұрын
Why does your Grid object need a Rigidbody2D ? Colliders can be standalone
@LaCreArthur
@LaCreArthur 4 жыл бұрын
Really nice explanations with your illustrations. A bit slow paced for me but with 1.5x speed it's perfect :)
@tuke4202
@tuke4202 5 жыл бұрын
The collision doesnt work for me if i have kinematic
@shockingshinx12
@shockingshinx12 5 жыл бұрын
I'm still having the issue where the character bounces back from the walls even after adding that line of code in the script?
@goingsillymode
@goingsillymode 3 жыл бұрын
i'm having the same problem, did you ever figure out how to fix it?
@shockingshinx12
@shockingshinx12 3 жыл бұрын
@@goingsillymode No I did not, sorry
@goingsillymode
@goingsillymode 3 жыл бұрын
@@shockingshinx12 alright, thanks anyways!
@letsplaynay9936
@letsplaynay9936 4 жыл бұрын
When my character touches the colliders, my background rotates? why is this?
@iam0ri
@iam0ri 3 жыл бұрын
A very helpful tutorial as I was having issues with my top down colliders working. However, I was using transform for my player movement as this allowed me to snap to grid on movement. Turning this into a velocity causes movement to... drop down (as in a platformer) and snap back to what it's location should actually be. Played around with gravity in the project settings and on my rigid bodies to no success. Anyone have thoughts?
@zeea6561
@zeea6561 Жыл бұрын
If I'm understanding correctly, Rigid body 2d needs to be set to kinematic
@kiwioverlord9519
@kiwioverlord9519 5 жыл бұрын
Hi CouchFerret, it's been forever since I asked you for help not because I've stopped programming, but because you answered all my old questions so well that I've been doing just fine! :D Anyway, lately I've had a more technical problem: you know how if you make a gameobject, object A, the child of another gameobject, object B, then object A's collider also registers as object B's collider right? Well the issue is that I have a weapon that is a child object of the player. The issue is that when an enemy's weapon and the player's weapon collide, the player takes damage because their weapon is part of their hitbox. Can I make a parent object not register the collider of its child object, or is there any other solution to this issue? Some workarounds I've tried were to make a separate game object the hitbox of the player and do transform.position=player.position instead if making it a child object, but this has it's own drawbacks.
@CouchFerretmakesGames
@CouchFerretmakesGames 5 жыл бұрын
Hey Kiwi! I missed you! :D I hoped that you haven't stopped working on your games, I'm glad you didn't. :) In a collision, you can access the exact colliders that were participating in it, and based on that you can handle the different scenarios. So for example: void OnCollisionEnter(Collision collision) { // This will be the sword's collider for example when the enemy hits your sword // But it will be your body's collider when the enemy hits you Collider myCollider = collision.contacts[0].thisCollider; // And this one is the enemy's sword's collider, this could come in handy Collider myCollider = collision.contacts[0].otherCollider; } But instead of checking the exact participating gameobjects, I would go with checking their tags and decide the damage taking based on that. Like for example, there would be "weapon" and "player" tagged objects with collider on them. Hope this helps! Let me know if not. :D Cheers!
@kiwioverlord9519
@kiwioverlord9519 5 жыл бұрын
@@CouchFerretmakesGames Hey, I've missed you too! It's been awhile since me met, but it feels like just yesterday you had only 400 subs! Now you have 4,000?! Well done and well deserved! And I don't imagine I'll stop programming anytime soon, I've had some success with my game on Itch.io: I reached 250 views :D , and there's no way I could've done it without you. 250 thanks you's! I'm a bit confused about the Collider myCollider = other/this Collider How does the other/this argument work? And I do use the tags "weapon" and "player" to deal damage; the enemy's weapon has a script "Weapon", which runs like this: if col.gameobject.tag = player, col.getcomponent player.HP-=10 but its still an issue because when the enemy weapon collides with the player's weapon, the weapon counts as tag = player since its a child object of the player, and the player takes damage.
@CouchFerretmakesGames
@CouchFerretmakesGames 5 жыл бұрын
@@kiwioverlord9519 Hey Kiwi! I've put together an example for you and sent it in an email. However, the code looks like this and is attached to the Player gameobject (the parent): using System.Collections; using System.Collections.Generic; using UnityEngine; public class MyScript : MonoBehaviour { public Collider2D playerCollider; public Collider2D swordCollider; void OnCollisionEnter2D(Collision2D collision) { ContactPoint2D contact = collision.contacts[0]; if (contact.otherCollider == playerCollider && contact.collider.tag == "Weapon") { Debug.Log(gameObject.name + " get hit"); } if (contact.otherCollider == swordCollider && contact.collider.tag == "Weapon") { Debug.Log(gameObject.name + " parried"); } } } And the swords are a simple child object with a collider. Oh and yeah the Players have rigidbody2d components because they are necessary for collisions. :)
@CouchFerretmakesGames
@CouchFerretmakesGames 5 жыл бұрын
@@kiwioverlord9519 And thank you for the support :). I really appreciate it, and I'm glad that my work helped you. I'm happy to hear that. :) Don't forget to link your game so I can check it out.
@kiwioverlord9519
@kiwioverlord9519 5 жыл бұрын
@@CouchFerretmakesGames Hi, oh yeah here's the link: kaiway.itch.io/spintowin It's pretty sophisticated if I do say so myself, so take a look at the Controls page. Also, I've got to add you to the Credits section! Is there a way to make Unity redirect to a link, like your KZbin page? And how do you want to be addressed in Credits? Just "CouchFerret"? And my support is the very, very least I could offer for the absolutely priceless help I've received from you! :)
@jeremiemorinderuyter9817
@jeremiemorinderuyter9817 6 жыл бұрын
Lovely character, by the way too avoid making all your variable "public" when want too see them in the inspector you can use the decorator "serializefield" , here the link to the documentation : docs.unity3d.com/ScriptReference/SerializeField.html .
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
Thanks for the suggestion. I should have mentioned it in the video. I'm aware of the SerializeField decorator, but I'm coming from a Python background where there are no access modifiers and you are also allowed to do almost anything. I like this kind of freedom, and I think it's a bit clearer too (but more error-prone too). However, both the SerializeField and public are accepted and commonly used practices. I think I'll mention it in the next programming episode. :) Thanks!
@arandomhashbrown3756
@arandomhashbrown3756 6 жыл бұрын
New subscriber
@CouchFerretmakesGames
@CouchFerretmakesGames 6 жыл бұрын
Welcome! :)
@Ziplock9000
@Ziplock9000 Жыл бұрын
You know you can click the 'Edit Collider' and visually change the position and size rather than guessing and putting values in Offset and Size
@Moreno6000
@Moreno6000 4 жыл бұрын
So why does my oncollision event not work it's driving me crazy
@gamerheroine
@gamerheroine 4 жыл бұрын
might need to click the 'is trigger' for oncollisionenter function? Or make sure the 2d vs not 3d's match for collision types. Those are my usually things that cause me problems but I'm not expert
@kureshimiru
@kureshimiru 5 жыл бұрын
Hi, I'm trying a movement solution almost exactly like yours, using Rigidbody2D's velocity property, but my character's movement is extremely jerky this way. My mini-script contains a playerRb (Rigidbody 2D) parameter, a Vector3 movement vector, a function called ProcessInput() that consists of only a single line (movement = new Vector3(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"), 0.0f)), a Move() function also with a single line (playerRb.velocity = new Vector2(movement.x, movement.y) and an Update() function that calls ProcessInput() and then Move(). Has anyone solved this problem? It can't be only me...
@Caslte371
@Caslte371 5 жыл бұрын
Can I see scripts code?
@CouchFerretmakesGames
@CouchFerretmakesGames 5 жыл бұрын
I'm working on it to have the scripts available online. Unfortunately, until then they are only visible in my videos. :/ I'm sorry!
@Caslte371
@Caslte371 5 жыл бұрын
@@CouchFerretmakesGames can u load them on cloud or github for now? Ты случайно русский?
@sparklestorm1236
@sparklestorm1236 Жыл бұрын
thank you for calling me a game dev. I don't know if I would go as far as to say that, but thanks anyway
@RedstoneHair
@RedstoneHair 4 жыл бұрын
Why does my character slide????!!!!!!
@glassystudio
@glassystudio 4 жыл бұрын
Arnold Schwarzenegger teaching game development
@Bignose_Dev
@Bignose_Dev 3 жыл бұрын
my damt player didint making collide i no idea i have all compoments !
@keithzhengzhaokhong2782
@keithzhengzhaokhong2782 4 жыл бұрын
nvm its a 2d game. Nice
@fisash9737
@fisash9737 4 жыл бұрын
а со слоями у тебя всё в порядке а? м?
@Aaaalfaroeo
@Aaaalfaroeo 4 жыл бұрын
Great, but now player's hitboxes are in it's feet.
Aseprite Top Down Pixel Art Character Design and Animation Part 1 - Tutorial
24:00
CouchFerret makes Games
Рет қаралды 307 М.
2D Top Down Movement UNITY Tutorial
7:21
BMo
Рет қаралды 230 М.
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
Creating SMART enemies from scratch! | Devlog
5:40
Challacade
Рет қаралды 373 М.
Everything You Need To Start Making Games (As A Beginner)
16:11
Juniper Dev
Рет қаралды 117 М.
TOP DOWN MOVEMENT in Unity!
22:30
Brackeys
Рет қаралды 1,2 МЛН
TOP DOWN Movement - Unity Tutorial
16:17
Sasquatch B Studios
Рет қаралды 17 М.
Draw fewer tiles - by using a Dual-Grid system!
6:22
jess::codes
Рет қаралды 711 М.