Easy 2D Tilemap Collisions | Unity 2018 Tutorial

  Рет қаралды 137,168

Chris' Tutorials

Chris' Tutorials

Күн бұрын

► My Unity 2020 Mini-Course - Make a 2D Platformer Character with State Machines ►
skl.sh/3lpWPQL
◢◤◣◥◢◤◣◥◢◤◣◥◢◤◣◥
The best way to add in collisions for tiles if you're building tilemaps in the in-editor Unity 2018 tilemap tools.
Download my scripts, game templates, and Unity assets ►► gumroad.com/christutorials
See My Full Software Courses
www.skillshare.com/r/user/chr...
www.udemy.com/user/chris-nava...
christutorials.teachable.com
➣ Also Follow Me On
Minds ►►bit.ly/ChrisTutorialsOnMinds
Gab.ai ►► gab.ai/ChrisTutorials

Пікірлер: 99
@Fox2-Videos
@Fox2-Videos 2 жыл бұрын
Dude. Very straight forward, and no annoying introduction or anything! I was using box colliders instead lol. I am new to Unity. Thank you!
@legend644
@legend644 4 жыл бұрын
I am very happy thank you!!!I was using an edge collider and adding all the points(which you could imagine happened veeery slowly, and I needed a new edge collider for every time I just want to leave an open space for the player to jump over
@ilmalocchio
@ilmalocchio 4 жыл бұрын
Chris, you said "tilemap" 27 times in 3.4 minutes. That's 7.94 utterances of "tilemap" per minute. If I skip around in the video, there's a very good chance I land on you saying "tilemap." I believe you should change the name of this video to "Chris Saying Tilemap"
@OnlyTryingYouTube
@OnlyTryingYouTube 4 жыл бұрын
bruh
@darklusare7582
@darklusare7582 4 жыл бұрын
bruh
@Aditya-wg3lp
@Aditya-wg3lp 4 жыл бұрын
bruh
@danas5846
@danas5846 4 жыл бұрын
bruh
@matteoscalvini
@matteoscalvini 4 жыл бұрын
bruh
@johnbassi9804
@johnbassi9804 4 жыл бұрын
Finally, a video that helped me! I've been trying to figure this out for hours! Thank you SO MUCH!!!
@harryhopkinson162
@harryhopkinson162 4 жыл бұрын
Same
@abrakadabra454
@abrakadabra454 3 жыл бұрын
saaaaaammmmmmmmeeeee thank you so much!!!
@tigersecc821
@tigersecc821 5 жыл бұрын
I love this channel looking forward to learning bunches every video
@Noah-hu5xp
@Noah-hu5xp Жыл бұрын
ty didnt know tilemap collider 2d existed. helped me. in 2022
@Kiki-deLucio
@Kiki-deLucio 5 жыл бұрын
This worked, thank you so much!
@DonaldCMarks
@DonaldCMarks 4 жыл бұрын
Very straightforward and helpful. Thank you :)
@pablobernal4824
@pablobernal4824 4 жыл бұрын
You saved my life. Thank you!
@HannyaTH
@HannyaTH 4 жыл бұрын
Dear Chris' Tutorials I have been trying complete my final project for game development course in my University and you really help me a lot with a simple solution I dying to find please accept my thanks, Your new subscriber is here take care from Thailand.
@dylanr-h1866
@dylanr-h1866 Жыл бұрын
This solution interacts poorly with many other unity features like rule tiles. You'll run into other issue like rendering order etc too. What you really want to do is go to your tilemap, and add the collider just like Chris shows in this video. Then, in your assets folder, navigate to all the tile assets you have and set them to either have no collider, sprite collider (for square 2d game as above this is probably not what you want), or 'Grid".
@azyjmexcuseokstop924
@azyjmexcuseokstop924 2 жыл бұрын
fun fact : you dont need to separate tiles with or without collision in different palettes : if you want a tile not to have collision, move all the points of the physics mesh together and it wont collide with anything.
@uzielnoguez4064
@uzielnoguez4064 5 жыл бұрын
Thank you man!! you helped me a lot!!
@stephennovak338
@stephennovak338 3 жыл бұрын
helped me out a lot during a game jam
@boogeymanlive9618
@boogeymanlive9618 2 жыл бұрын
Thank you very much broo for explaining each and every component, i was struggling to collide with player. I didn't know about the rigid body and box collider on player. It helped a lot broo. Keep posting this type of videos. Love u lots...….
@Frankie.Frankie.
@Frankie.Frankie. 4 жыл бұрын
Thankyouthankyou, this is what i needed!
@leonlukla
@leonlukla 5 жыл бұрын
Helpfull tutorial. Good job
@yoginath777
@yoginath777 6 жыл бұрын
Thanks ! Very helpful.
@georgecobb1466
@georgecobb1466 4 жыл бұрын
this helped a lot. thank you
@joejoemojo
@joejoemojo 4 жыл бұрын
this was very helpful thanks
@duckman1824
@duckman1824 3 жыл бұрын
this helped me very much! THX!
@hiba_mughal
@hiba_mughal Жыл бұрын
so simple thank you!
@fehmiaksakal7738
@fehmiaksakal7738 5 жыл бұрын
Thanks for video !
@ramizian
@ramizian 4 жыл бұрын
Thanks for the tip! :D
@mertcakr6938
@mertcakr6938 3 жыл бұрын
much appreciated it ,thanks
@k0stur327
@k0stur327 4 жыл бұрын
Thx so much!!
@ParsecGame
@ParsecGame 3 жыл бұрын
Thank you!
@kingmumblez6577
@kingmumblez6577 5 жыл бұрын
Thanks, I was making invisible game objects, adding box collider 2D and placing them all over the map
@sythlix7939
@sythlix7939 4 жыл бұрын
saaaaaaaaaaaaaaammme
@toffylang
@toffylang 2 жыл бұрын
thank you so much!
@zoxielp
@zoxielp 3 жыл бұрын
Thank you very much :D
@Lorena-lp4rb
@Lorena-lp4rb 3 жыл бұрын
tysm!!
@pikooloco2879
@pikooloco2879 4 жыл бұрын
ty for the help :3
@user-qc5hd6ih7q
@user-qc5hd6ih7q 4 жыл бұрын
thx so much
@omercohen945
@omercohen945 4 жыл бұрын
THANKS BRO
@VioletDolphin
@VioletDolphin 3 жыл бұрын
Thank YOU~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@Keagan_Ferguson
@Keagan_Ferguson Жыл бұрын
THANK YOU SO MUCH! You earn't a sub!
@pedrobrasil892
@pedrobrasil892 4 жыл бұрын
Thanks! You won 1 subscriber =D
@dinolast3677
@dinolast3677 4 жыл бұрын
THANK. YOUUUUUU!!!!!
@71thfriedrich34
@71thfriedrich34 3 жыл бұрын
Thanks bro
@ShrekPNG
@ShrekPNG 4 жыл бұрын
thanks. you are cool
@creeperfreaker3910
@creeperfreaker3910 4 жыл бұрын
thanks!
@BitsAndBytes442
@BitsAndBytes442 4 жыл бұрын
Thanks
@draonax
@draonax 3 жыл бұрын
is there anyway to do this with a kinematic rigidbody for the player?
@EvansdiAl
@EvansdiAl 3 жыл бұрын
Excuse my ignorance, I just started learning unity. Is this part of a playlist, if so, which? I would like to watch the whole of this series.
@kermster
@kermster 2 жыл бұрын
ty sir
@arturovi
@arturovi Жыл бұрын
nice ty
@Steph-T-45
@Steph-T-45 3 жыл бұрын
I want a feature where you can draw the colliders like with the sprites
@MrMrPinguin
@MrMrPinguin 3 жыл бұрын
Is there a way to set different or custom colliders to specific tileparts? So like adding it with painting the tile? In a Nutshell: If I paint a wall, I want to have a Collider with "wall" Tag on it. If I paint gorund I want a Collider with "ground" tag on it, and if I paint a edge I want the horizontal Collider is a "gorund" tag and the vertical a "wall" tag and on the edge is a "edge" tag collider. In a big coconutshell: I.e. in my game I control via Script if the player is on Ground, by saying "hey, you stand with your ground detection piont on a ground collider". Same for walls. And nearly the same for Edges, the player is able to hold and hang on. Here i use a collider with "edge" tag in the part of the edge. I want to do that this way, because so I can clearly determine in wich state my character currently really is and which animation should be played and what my player could do and what he didint. So I know I can do it by adding the Tilemap i.e. for a wall in a different layer than the tilemap for ground and gave them both a different Tag, but this seems not be very sensefull for the workflow. Maybe someone have some idears to automate this process.
@MoonLiteNite
@MoonLiteNite 4 жыл бұрын
Anyone have any tip son getting this to work with Is Trigger? I am able to manually add a 2d collider box without issue, but using the tile collider no dice..
@HelPfeffer
@HelPfeffer 3 жыл бұрын
Tnx
@daveb7596
@daveb7596 5 жыл бұрын
its so damn annoying they dont allow u to do it on the same tile set
@The5thAstronaut
@The5thAstronaut 4 жыл бұрын
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.
@rigzmoviediaries654
@rigzmoviediaries654 4 жыл бұрын
i have the same thing
@The5thAstronaut
@The5thAstronaut 4 жыл бұрын
@@rigzmoviediaries654 we gotta figure this out bro. I suspect maybe there's a script we need to attach to to collidables maybe.
@alergames147
@alergames147 4 жыл бұрын
I'm having the exact same problem
@christianstachl
@christianstachl 2 жыл бұрын
​@@The5thAstronaut Maybe (or probably) you already figured it out, but since i had the same problem i wanted to share my solution for others. First the setup: do it like in the video, set up the tilemaps and add tilemap colliders if needed. For me i have one for the floor to walk on and one for walls to collide with. In the tilemap renderers i set the layer for the floor to -2, the layer for walls to -1. The layer for the player (in the sprite renderer) is 0. Also a little thing for the player, in the constraints of the Rigidbody2D check freeze rotation z. The main problem: I just learned earlier about movement and had two scripts for it, a simple free movement script and a grid movement script which is a little bit more complex. I used the grid movement script. Out of frustration i changed it to the free movement script and it worked! The only little problem was some stuttering when running into a wall. I googled a bit and found out you have to put stuff that change physics into the FixedUpdate method and not in the normal Update. Of course i'm also gonna share the movement script: www.codepile.net/pile/GeZBYxej I hope it helps someone. At least i can sleep easy now 😅
@EdadImperial
@EdadImperial 2 жыл бұрын
there is a way to mesh togetehr all the colliders in 1, how do you do that?
@Thestefanftw
@Thestefanftw 5 жыл бұрын
It works but objects/art I put in goes invisible, any idea why?
@list_f3uille966
@list_f3uille966 3 жыл бұрын
can anyone please help me, I follow this exact process but when i run the game my player spins around and turns when he collides with walls that are vertically placed, so for example if i were to put a box in the center of the room my player turns around when he hits the box and gets stuck in a weird position.
@xxyxxyyyx
@xxyxxyyyx 3 жыл бұрын
Why do some of my spirtes get automaticly a collider and some dont, I am on the same tilemap and drawing on the same one, just changing the brush for different wall looks
@swisstofflibuebe1533
@swisstofflibuebe1533 4 жыл бұрын
those cars in the background hahahaha
@itaisinger1360
@itaisinger1360 Жыл бұрын
i dont have a tile map option under 2d when trying to create. have i done something wrong?
@ticktockclook2617
@ticktockclook2617 3 жыл бұрын
how do you do on collision enter with this
@HerzhaTheShapeshifter
@HerzhaTheShapeshifter Жыл бұрын
when I add a Tilemap collider, the shape isn't detected so no collider is added
@BoltGoesPro
@BoltGoesPro 2 жыл бұрын
Appreciate it, but could've saved a couple minutes by just saying, add a tilemap collider to the tilemap xD
@codyomeara
@codyomeara 3 жыл бұрын
What collision would I put on the ground so my character doesnt fall?
@residentsleeper828
@residentsleeper828 3 жыл бұрын
just a basic box collider 2d I think, not an expert though
@HermitMerc
@HermitMerc 3 жыл бұрын
i made a tilemap and my sprite caracter just fell through. also my play is invisible when i start the game
@tunis4
@tunis4 6 жыл бұрын
I'm having a weird problem. Most of my tiles have a collider but some of them don't. They are all in the same tilemap. Edit: Nevermind, the problem was I didn't set my rule tile's collision to grid. Now it works. Thanks for the tutorial.
@Tubuxis
@Tubuxis 5 жыл бұрын
how did you set it to grid?
@rigzmoviediaries654
@rigzmoviediaries654 4 жыл бұрын
how did you set it to grid answer
@xxyxxyyyx
@xxyxxyyyx 3 жыл бұрын
damn having the same problem dont know how to solve it
@tunis4
@tunis4 3 жыл бұрын
@@xxyxxyyyx sorry idk i dont use unity anymore
@nastra8798
@nastra8798 3 жыл бұрын
@@Tubuxis Select your tile asset and change "collider type" in the inspector
@alejob5325
@alejob5325 3 жыл бұрын
Eh bro necesito el asset del firu
@sereecerat7133
@sereecerat7133 6 жыл бұрын
Hello I followed your tips but having some problems as shown in the video in the link here kzfaq.info/get/bejne/qqhhicuW3MrVaIE.html . Could it be that I'm managing the movement oh the player wrong? Should I control if there is a collision in the next tile via script? ow are you moving your player? Are you moving the rigidbody or the transform ? Any kind of help would be appreciated! TY
@rigzmoviediaries654
@rigzmoviediaries654 4 жыл бұрын
Nice tutorial. Only problem is it doesn't even work
@Zer0Morph
@Zer0Morph Жыл бұрын
This didn't work for me at all.
@user-sq1sr1gn8o
@user-sq1sr1gn8o 5 жыл бұрын
2/3d Like
@MochaFrenzy
@MochaFrenzy 4 жыл бұрын
Can you speak any quicker? Like Dude slow down! Who wants to keep rewinding and pausing?
@links-gut-versifftergrunme1809
@links-gut-versifftergrunme1809 3 жыл бұрын
Thank you!
@Xtonior
@Xtonior 3 жыл бұрын
Thanks
Pickup Items to Inventory on Trigger Collision | Unity 2018 Tutorial
11:28
A teacher captured the cutest moment at the nursery #shorts
00:33
Fabiosa Stories
Рет қаралды 52 МЛН
Little girl's dream of a giant teddy bear is about to come true #shorts
00:32
Water powered timers hidden in public restrooms
13:12
Steve Mould
Рет қаралды 692 М.
Tilemap Basics - Unity / 2021 (Tutorial)
12:13
MichaelsGameLab
Рет қаралды 4,3 М.
How I learned Unity without following tutorials (Developing 1)
18:11
Game Maker's Toolkit
Рет қаралды 2 МЛН
Auto Tiling with Rule Tiles in Unity 2022 ~ Pixel Art Tileset Tutorial
9:10
How I made an Excellent Platformer
8:25
GoldenEvolution
Рет қаралды 266 М.
Easy Tilemaps and Dynamic Auto Tiling - Unity 2D
5:50
Game Code Library
Рет қаралды 21 М.
LUDUM DARE 42 - Making of EVOLUTION
9:44
Blackthornprod
Рет қаралды 332 М.
Funny Fails 🤭🤭🤣 #failsvideo #shortsfails #funnyfails  #fails .
0:52
Nutella-Kinder burrito bomb ! 🤤🎉
0:47
adrian ghervan
Рет қаралды 10 МЛН
ToRung short film: 🐶puppy is hungry🥹
0:32
ToRung
Рет қаралды 23 МЛН
哈哈这些娃娃可烦人了!#火影忍者 #佐助 #家庭
0:31
火影忍者一家
Рет қаралды 33 МЛН
Funny Fails 🤭🤭🤣 #failsvideo #shortsfails #funnyfails  #fails .
0:52
Forming of goal foam || A2Z SKLLS
1:00
A2Z SKILLS
Рет қаралды 34 МЛН