How to Create YSORTING in Godot 4

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • In this video we are going to go over how to add ysorting in godot 4, many things have changed with the way ysorting is implemented in godot 4 and it is honestly much better in godot 4 than the ysorting system was in godot 3.
    Download Free art pack: game-endeavor....
    make sure to download the free as that is all we will need for this series.
    Link RPG Godot 4 series playlist: • How to Make an RPG in ...
    ----------------------------------------------------------------------------------------------------------------------------------------
    Thank you so much for watching I really hope this video helped.
    if you did enjoy then please go and click that subscribe button to help out the channel. I means so much and I love your feedback in the comments to let me know what it is that you enjoyed. Again thanks so much and I would love to see you again!
    have a great rest of you day and of course be safe :)
    - thanks DevWorm,
    ----------------------------------------------------------------------------------------------------------------------------------------

Комментарии • 304

  • @dev-worm
    @dev-worm  Год назад +8

    link to the full series: ruclips.net/p/PL3cGrGHvkwn0zoGLoGorwvGj6dHCjLaGd

  • @Milham-hg7hf
    @Milham-hg7hf 4 месяца назад +38

    if you have an issue where the y sorting is not work. try this :
    1. assume that you have turn on the "y sort renabled" at tilemap in ordering sectionn
    2. you have to turn on "y sort enabled" in layer section too, and give the layer z-index 1

    • @SGLaih
      @SGLaih 3 месяца назад +3

      My champion.

    • @DreamForge1229
      @DreamForge1229 3 месяца назад +1

      Thank you! Clicking forever finding the box I missed.

    • @pennti2319
      @pennti2319 2 месяца назад +1

      thank you

    • @MalikAliyev-ld7uj
      @MalikAliyev-ld7uj Месяц назад +1

      Its about 3 a.mI have been trying to solve this problem for like 4 o'clock, thank you :D

    • @TheMbaude
      @TheMbaude Месяц назад +2

      To build off of this: your player and ysort layer need to have the same z-index. Just figured it out.

  • @Koden
    @Koden Год назад +60

    7:15 Little tip. Godot will do simple math for you. So if you have the y position at 13 and you wanna move it by 15 positively, just do 13 + 15 and it will solve and give you the number. This works for anywhere that you can put in numbers, even resolution. It's very useful so you don't need to try to do mental math or bust out a calculator. If I recall right this works with - + * /

  • @SnackSizedHistory
    @SnackSizedHistory 2 месяца назад +5

    for anyone who is having issues here the steps for Y sorting : Make sure player Y Sort Enabled is Disabled and Z Index = 1, Z as Relative = ON, The TileMap Z index = 0, Z as Relative = ON, Y Sort Enabled = ON, all layers Y Sort = ON, grass layer Z Index = 0, cliff layer aka second layer Z index = 1, Last layer Trees ets Z Index = 1 make sure all 3 Layers have Y Sorting = ON

    • @gunmo5053
      @gunmo5053 Месяц назад +1

      Dude you're a life saver...my collision wasn't working for some reason, and this fixed the issue! Thanks a lot mate👍👍

  • @kizzle_mi_nizzle6069
    @kizzle_mi_nizzle6069 9 месяцев назад +12

    As a first time godot learner and programer I find these videos are great for learning the features of godot. This one was a bit choppy but I understand you are playing with a brand new feature so it makes sense. The best part of this for me so far was the programing the character node. Other programing learning tools i've use basically give you a list of things to write without explaining how functions or variables work which I found odd as when I asked my brother he explained it clearly in under 60 seconds. I found the practical use of the programing code shown in game as well as clear explanations of why you were writing each line of code really helped where vetran programers with their beginner tutorials has not helped me. So thanks for making these videos. Super excited to start my first project!

  • @mrw2202
    @mrw2202 Год назад +25

    This is an amazing tutorial. You're like one of the only people doing tuts for latest version of Godot. Keep going and you'll corner the tut market.

  • @dustaone8521
    @dustaone8521 Год назад +47

    I'm a complete beginner and I'm enjoying the series so far, but sometimes it's really hard to follow what you are doing with the erratic mouse movements and clicking through panels super fast, especially when you get mixed up or forget something. It would be much easier to follow if you slowed down a little bit and maybe edited/scripted a bit more and/or explained in a voiceover what errors you made and how you're fixing them.
    Thanks.

    • @peterzinn2058
      @peterzinn2058 11 месяцев назад +14

      Just wanna chime in and say that I'm not a complete beginner and still feel this. Content is great, but a little extra scripting and editing wouldn't hurt. The back half was challenging to follow.

    • @Amazing_Software
      @Amazing_Software 10 месяцев назад +2

      HOT TAKE - The man is giving away gold for free. Be gracious. He is building a game, AND educating us. THANKS DUDE!!! We need to put the work in if we want to follow his tips. He's not going to spoon food you, no one should. This isn't a university class. Good luck everyone, happy gaming.

    • @degariuslozak2169
      @degariuslozak2169 9 месяцев назад +8

      @@Amazing_Software No one is disagreeing with that,we're just saying things can be improved a bit. Also no uni class spoon feeds you everr

    • @ACharlar22
      @ACharlar22 9 месяцев назад +9

      @@Amazing_SoftwareBro, constructive criticism is good for him too, better tutos can attract more ppl and more subs.

    • @Amazing_Software
      @Amazing_Software 9 месяцев назад

      @@ACharlar22 Ok good point. But is there anyone else making better tutorials than this guy? We should give credit where it's due.

  • @miadietrich7347
    @miadietrich7347 8 месяцев назад +30

    Got stuck, but something that helped me: turn Y-sorting on for the collision shape of your player, not the player themselves. Also, don't forget to turn it on for the whole world, lol.

    • @notjustateen
      @notjustateen 8 месяцев назад +4

      THANK YOU!

    • @bruno.barradas
      @bruno.barradas 7 месяцев назад +3

      Thanks.

    • @deadjuice1880
      @deadjuice1880 5 месяцев назад +2

      Thank you!

    • @bambus44
      @bambus44 5 месяцев назад +2

      Good thinking, thanks :D

    • @Korn1holio
      @Korn1holio 5 месяцев назад

      What if I don't have a collision shape, I wonder.

  • @Aelux5216
    @Aelux5216 6 месяцев назад +8

    Anyone who's player is disappearing after passing y = 0, the warning that was ignored here seems relevant, as ysort layer seems like it should be above the regular tilemap layers, so on the ysort layer z-index you want to set that to 1 and also set your player root nodes index to 1 as well

    • @oliviermavre
      @oliviermavre 6 месяцев назад

      I had the same problem ! Thank you.

    • @deadjuice1880
      @deadjuice1880 5 месяцев назад +1

      Wow, just that I was looking for!

    • @Mitko1239
      @Mitko1239 4 месяца назад

      Life-saver! Thank you, I saw so confused.

    • @junzi44
      @junzi44 3 месяца назад

      bless your soul. I was scrolling through all the solutions people had and none fixed it till this one

    • @imanironman4734
      @imanironman4734 2 месяца назад

      Thanks!

  • @user-xq5zc4se6k
    @user-xq5zc4se6k 9 месяцев назад +26

    For anyone who may still be having problems with y-sort not working. Make sure the root node has Y-sort enabled as well.

    • @feryanwibowo241
      @feryanwibowo241 9 месяцев назад +2

      I am sorry what is root node

    • @rompevuevitos222
      @rompevuevitos222 9 месяцев назад +2

      @@feryanwibowo241The top node in your scene
      Altho this is misleading, because the actual root node is the game window, which is a node only visible while the game is running on the Remote tree view

    • @lorentyfle3321
      @lorentyfle3321 6 месяцев назад +3

      This commentary helped someone.
      Thank you.

    • @lyingpancake95
      @lyingpancake95 4 месяца назад +1

      This worked for me! I miss having a node to sort this kind of thing. Checking a box in every single node involved in y-sorting is extremely tedious and easy to forget...

    • @Mr.RandomMoo
      @Mr.RandomMoo Месяц назад

      Thank you :)

  • @fancycactus234
    @fancycactus234 11 месяцев назад +49

    I could not seem to get the Y Sort Origin to set but finally realized you have to set the number, then click the tile to apply that number to the tile. Just in case anyone else was confused.

    • @mikew6004
      @mikew6004 10 месяцев назад +5

      OMG I just spent 5 minutes trying to figure out why it wasn't working... Thank you!

    • @WeirdBrainGoo
      @WeirdBrainGoo 7 месяцев назад +2

      Thank you! I had the same problem. At 6:21 it seems DevWorm turns Y-sorting on on the player, but that didn't work for me. Turning it on on the collision shape instead made it work like it should. :D

    • @albert69Einstein
      @albert69Einstein 4 месяца назад +2

      thank you. while this is a good tutorial, still needs some polish. instructor needs to be more verbal in EXACTLY what they are doing. i.e. what keystroke or buttons they are pressing.

    • @albert69Einstein
      @albert69Einstein 4 месяца назад

      I couldnt get my player's head to stop dissappearing behing the "chest". Once I turn off y-sorting on the player it, it now appears normal. What is your player's Ordering/y-sort value ? enabled(checked) or disabled(unchecked) ?

  • @MaddMennn
    @MaddMennn Год назад +15

    You have made learning and using Godot accessible to me after weeks of struggling to find an up to date course. Thank you!

    • @dev-worm
      @dev-worm  Год назад +1

      so glad to hear that bro, if you ever need any help Im here for you.

    • @Inosukidev
      @Inosukidev 5 месяцев назад

      i need help : 10:30 im still in front of the tree what can i do to fix that ??

  • @tuckerwoollard2613
    @tuckerwoollard2613 4 месяца назад +3

    for anyone struggling to see the character, your tile map needs to be highest on the node list. Also the other little error he got about the z index, the tile map itself is set to 0 so in your ysort layer just put z index to 1 or 2 or however many layers you got, just not 0

    • @dev-worm
      @dev-worm  4 месяца назад

      thanks for pointing that out!

  • @benhawy
    @benhawy 3 месяца назад +4

    For me I had to set the world>TileMap>Layers[ysort layer]>Z index to 1 to make the ysorting work. It made the second error warning disappear.
    Great video!

    • @dev-worm
      @dev-worm  3 месяца назад

      glad you were able to figure that out and everything was able to work!! thank you!

  • @Slipping_thru_the_Seams
    @Slipping_thru_the_Seams Год назад +16

    i really appreciate your series. i do wish you would edit out some oopsies as it gets confusing at times

    • @dev-worm
      @dev-worm  Год назад +2

      haha thanks bro, ill work on that

  • @KillerGameDev
    @KillerGameDev 11 месяцев назад +1

    I came across this randomly. Didnt know what y sorting was but this was what I was looking for. I really appreciated the way this video went down and really appreciated the quality in your tutorial. I subscribed and look forward to more stuff. :)

  • @Daniel.LeePhotography
    @Daniel.LeePhotography Год назад +1

    this is amazing man!!!! thank you so much!! please keep making more videos about godot4. I think youre the most up to date and helpful godot teacher there is currently

    • @dev-worm
      @dev-worm  Год назад +2

      working on many tutorials as we speak :D

  • @MetaDataAutomation
    @MetaDataAutomation 7 месяцев назад +3

    Can someone please explain to me, at around 7:00 when we go to the player and we do a negative off-set of -15 to the Y, which is it doing here specifically? I played around, and if you don't do this step, your characters body will go behind the plants when in front. Is this some kind of layering technique? And when I make my own game, will it always be -15 that I set this by?

    • @h-angrygirl
      @h-angrygirl 5 месяцев назад +1

      Thank you very much, I thought that this value was not "specific" and I put another one and it didn't work for me, you solved my error thanks to your comment, I hope someone answers why it is set -15

  • @ozangozoglu6155
    @ozangozoglu6155 Год назад +2

    Thank you so much. Without your videos, achieving my personal dream would be a lot harder. I will do my best.

  • @mihirparab2172
    @mihirparab2172 Год назад +1

    OMG YES!! I'VE BEEN WAITING FOR THIS..

  • @akunbora
    @akunbora Месяц назад +1

    If I don’t use a tilemap and have a lot of objects in a scene, I try to organize them into blank white nodes, like putting all the enemies in an “enemies” node and trees in a “trees” node. But Y sorting doesn’t work when I do this. I thought it would because the blank nodes don’t have any transforms. So, my only option might be to just let them stay messy as siblings of my player node.

  • @tomoyaokazaki2138
    @tomoyaokazaki2138 4 месяца назад

    this is very interesting, when I tried this ysorting with Godot 4.0, I had so much hassle and it was just not working. I downloaded the most recent version of Godot 4 (I believe I downloaded Godot 4.2), and now, I was able to get Ysorting to work with legitimately NO issues, hassle, no stress. Everything that worked for you worked for me. Everything you encountered that did not work did not work for me either. In other words, this newest version of Godot 4 is working perfectly with your tutorial videos! Thank you so much!

  • @RG-ef8vm
    @RG-ef8vm 5 месяцев назад +1

    Tip: If you want to select a tilemap tile without applying the current collision shape, use CTRL+click. If the tile does not have a shape drawn, you will need to select the Add polygon tool to draw a new shape (tiny box above the image of the tile you just selected).

    • @zigzag2341
      @zigzag2341 Месяц назад

      what a crazy shit... even after reading your comment I spent 1 hour to find out why it reset shape ... ugliest UX

  • @stereo92
    @stereo92 Месяц назад

    0:40 intro
    1:00 Add Tile Collision Shapes
    4:22 Add Player CollisionShape2D
    5:38 Fix Player CollisionShape2D
    7:40 Add Y-Sort Origin to Tiles
    10:22 Enable Y-Sort to Tilemap
    10:50 It Works
    Enable y-sort to:
    - world scene
    - worl node
    - tilemap
    - ysort layer inside tilemap
    - player scene
    - collision shape 2d inside player scene
    (i think i'm not forgetting any)

  • @Ghin_Antonic
    @Ghin_Antonic 2 месяца назад

    Thanks was looking for this feature and didn't know it was so extremely easily implemented in godot, awesome!

    • @dev-worm
      @dev-worm  2 месяца назад

      amazing to hear!! i hope it was able to help! thank you!

  • @deadjuice1880
    @deadjuice1880 5 месяцев назад

    Tip for if you feel like your player is getting caught up on the bottom or top of ysort objects as you pass close by them:
    Go back in TileSet, physics layer 0, and on the troublesome objects, flatten the polygon on that side that you're getting caught on.
    Too many triangles and sharp edges while doing this is why you're getting caught up on stuff.
    Try to remember now moving forward when setting the points for new object.
    It's okay to trace a root coming from a tree, just don't go crazy. Keep it simple.
    You wouldn't like it in a game you paid good money for, getting caught up on everything while running around or away.
    So try not to do it yourself. ;)

    • @dev-worm
      @dev-worm  5 месяцев назад

      very good point!

  • @keithestanol3771
    @keithestanol3771 11 месяцев назад +1

    not gonna lie, this was really difficult for me to get and figure out. NOT YOUR FAULT it was all me, but after rewinding a bunch, I finally got it. Thanks for helping me to get it. On to the next part in the tutorial!

  • @Amazing_Software
    @Amazing_Software 10 месяцев назад +2

    I'm gonna have to buy like 10 copies of your game dude. THANK YOU!!!!!

    • @dev-worm
      @dev-worm  9 месяцев назад +2

      Glad I could help lol!

  • @makermatt93
    @makermatt93 5 месяцев назад +2

    Something that confused me that I finally fixed. When I created the tileset, I pressed "yes to automatically create tiles in the atlas", which made everything one block so I could not select the entire tree, which in turn I was unable to correctly put the ysort on it.
    You need to press no and then hold shift click to make larger tiles as he shows.

    • @dev-worm
      @dev-worm  5 месяцев назад

      good point! glad you solved it and understand it a bit better now! I shouldve made that more clear in the video! thanks for pointing that out though!

    • @zigzag2341
      @zigzag2341 Месяц назад

      @@dev-worm yes, you should!

  • @raulyjimenez9167
    @raulyjimenez9167 2 месяца назад

    FOR ANYONE STILL NOT GETTING CORRECT Y SORTING. They need to be on the same Z layer. From what i have seen. I haven't tested this with tile maps. I am testing this on pickups.

  • @marksievert6774
    @marksievert6774 Год назад

    I'm following you series to try to get the basics to make my game. thank you.

  • @Jephed_
    @Jephed_ Год назад +1

    You're a lifesaver! Thanks for the video. This helped me a lot!

  • @mihirparab2172
    @mihirparab2172 Год назад +2

    it did help... tysm!

  • @maocleal
    @maocleal 5 месяцев назад

    Ysorting makes it look like already some professional top down RPG game 😍😍 I'm excited for the next videos in this series, thank you so much, @DevWorm 😃

    • @dev-worm
      @dev-worm  5 месяцев назад

      thank you so much!! I hope the rest of the series proves to be helpful!

  • @ibrahim_punisher289
    @ibrahim_punisher289 Год назад +1

    plz continue and dont stop because i forgot every thing in godot it and when godot 4 release i cant understand anything . thanks alot

    • @dev-worm
      @dev-worm  Год назад +3

      episode 4 is pretty long lol because its a combat system, but hoping to get it out tomorrow!

    • @ibrahim_punisher289
      @ibrahim_punisher289 Год назад +2

      @@dev-worm i hope

  • @mickauls_
    @mickauls_ 2 месяца назад +1

    Your MAIN node MUST be a NODE-2D not just a node. That way you can make the y-sort enabled for the whole world node under Ordering.

    • @dev-worm
      @dev-worm  2 месяца назад

      correct! im sorry i didnt point this out in the video!

    • @BenBevan66
      @BenBevan66 23 дня назад +1

      Replying to thank you as I didn't realise that with the new tilemap system in 4.3 that I had my tilemaps as children of a normal node. Thanks!

  • @alphaios7763
    @alphaios7763 6 месяцев назад +2

    I started having issues with Y sorting at some point, thought I'll never get it fixed. enabled Y sort all over the place, started panicking... and then I tried setting Y Sort Origin on the objects layer (named ysort in the video - where all objects are placed). I set it to 10 and was still behind the objects, then set it to -10 and VOILA - everything worked as expected (in front of stone when walking in front, behind it when walking behind)! hope it helps someone!

  • @ninjacodertech
    @ninjacodertech 8 месяцев назад +1

    this is a very helpful tutorial! thanks!

  • @peteryoutube7972
    @peteryoutube7972 Год назад +2

    Love the series!!!
    How were you able to select the whole tree when changing its physics layer for me it only allows me to work on 1 tile at a time? xD
    Also the character seems to start with a 0 y-index so might be behind the tilemap for most people!

    • @Whisping1
      @Whisping1 Год назад +3

      You need to go world scene -> TileMap, then select TileSet at the bottom, next press Setup. You need to select whole tree as one tile using Shift + drag your mouse with pressed left button. If before tree was selected like separate tiles, you will need to erase these tiles w/ eraser tool. Do not forget to turn eraser off after erasing.

    • @peteryoutube7972
      @peteryoutube7972 Год назад

      @Nikolai thank you for some reason my godot wasn't working but after restart what you mentioned worked 👍

    • @a.rafaelguimaraesvieira8082
      @a.rafaelguimaraesvieira8082 9 месяцев назад

      Have you found a fix for this? I'm going crazy.

    • @polymori
      @polymori 8 месяцев назад

      @@Whisping1 I tried doing this but even when using shift + LMB drag it'll select everything as separate tiles. Unsure what I'm doing wrong here, but I can't get the tiles to be recognized as a single tile instead of separate.

    • @misho_dev
      @misho_dev 6 месяцев назад

      thanks i was stuck on this too :)

  • @joshm2033
    @joshm2033 3 месяца назад

    Mine finally works now, i had to combine a few comment suggestions;
    I set all of the y-sorting on each individual thing (trees, rocks etc) to -16
    i set the Z for the y-sorting TileMap Layer to 1
    i set the Z for the player to 1
    it now works! :D
    Hope this helps someone!

    • @dev-worm
      @dev-worm  3 месяца назад

      thanks for pointing all this out!! I know it will prove to be helpful!!

  • @quanghieudang8659
    @quanghieudang8659 2 месяца назад

    For anyone have issue character disappear when moving up. Check the entire tile map to see if the map below the y = 0 coordiante.

    • @dev-worm
      @dev-worm  2 месяца назад

      very good point!

  • @ewertonrangel9763
    @ewertonrangel9763 8 месяцев назад

    you are INCREDIBLE, i was looking for it and dont even know the name of "ysort" for search, thanks m8 God bless u

    • @dev-worm
      @dev-worm  8 месяцев назад

      thanks brother! so happy to hear that you were able to find what you needed!

  • @LRamony
    @LRamony Год назад

    Perfect series, Perfect video

  • @the-birbo
    @the-birbo 2 месяца назад

    I couldn't get it to work until I figured out I needed to set the layer's z-index to 1 and the player's z-index to 1.

  • @user-dj3hh8dw5f
    @user-dj3hh8dw5f Год назад +2

    Hello, dear DeWorm. Do the lessons on creating a simple level system. An example of such a system. the player takes experience points, and after that his characteristics of speed, attack, etc. change. Or how to make sure that after filling the experience bar progress strip so that the player's weapon changes?

    • @dev-worm
      @dev-worm  Год назад +3

      will for sure create that in the next series, which is going to be a survival game, so player stats will forsure be in that

    • @user-dj3hh8dw5f
      @user-dj3hh8dw5f Год назад +1

      @@dev-worm cool, and there you can explain how to make the simple construction system .

  • @gaming90sbaby
    @gaming90sbaby Месяц назад

    Awesome walk throughs so far! One question I have is why does the enemy ignore physics layers? thank you!

    • @dev-worm
      @dev-worm  Месяц назад +1

      it may be because the enemies layers and mask arnt the same as the environment or maybe there isnt a collisionshape within the enemy? Hoping to help.. but i am totally unsure unless I could look at the project!

    • @gaming90sbaby
      @gaming90sbaby Месяц назад

      @dev-worm appreciate it! I have copied everything from your tutorial playlist so it's all the exact same. Not sure if yours works, and I missed a small detail.

  • @Ferns_Gaming
    @Ferns_Gaming 6 месяцев назад

    To anyone who might be seeing this in the future, and has an issue with ysort, ensuring that all the objects that need ysorting are in the correct layer in the TileMap tab where theBase Tiles are is what solved it for me.
    I'm in Godot 4.2.1 if that matters.

  • @TutnichtsZumCode
    @TutnichtsZumCode 6 месяцев назад

    really good video series to learn godot as a beginner!
    the only feedback i'd like to give is that you seem to move quite fast and it's hard to keep up with what's happening, especially when you go back and forth bc something didn't work on the first try. great stuff nontheless

    • @dev-worm
      @dev-worm  6 месяцев назад +1

      thanks! sorry its a bit fast I do apologize! I wish back when I was filming these I would've noticed that so I could've slowed them down in turn making them easier to understand

  • @inoshipotyanin
    @inoshipotyanin 6 месяцев назад

    Спасибо огромнейшее!!! Один из самых полезных туториалов!

  • @GalaxyJammed
    @GalaxyJammed Год назад +2

    Will you be able to make a system where you can find better weapons in crates that will upgrade your overall strength (no exp or anything needed)? Great video btw!

    • @dev-worm
      @dev-worm  Год назад +1

      in the next series that will be a survival series

  • @Drizzza
    @Drizzza 10 месяцев назад

    i was about to not use godot for the lack of digestible information on the new version of the game until i found your channel

    • @dev-worm
      @dev-worm  10 месяцев назад

      I'm working on being so much more consistent with my upload schedule!!! trying for every other day from here on out. I want to do everything I can to try and help the Godot community.

  • @pranksies4496
    @pranksies4496 Год назад

    Very Chill explanation, love it

  • @FIXINIT3
    @FIXINIT3 3 месяца назад

    it was a little hard too follow since I was not using a tilemap but it worked out, thank you.

    • @dev-worm
      @dev-worm  3 месяца назад

      glad it was all able to come together!

  • @ginopinosulpino6732
    @ginopinosulpino6732 5 месяцев назад

    amazing tutorials bro keep it up

    • @dev-worm
      @dev-worm  5 месяцев назад

      thanks brother!

  • @hollowtongue
    @hollowtongue 8 месяцев назад +1

    i have an interesting little bug. I added a camera and stuff to my player so i could make a bigger map and explore. Well I drew my map all around the world origin, and after setting the ysort stuff, everything above the world origin got hidden (including the player until i turned off the ysort on the world node.) Even with that fix however, anything from my ysort tileset that i draw above that point disappears immediately. Anyone have a solution for me? I was considering just moving the worlds origin point up to the top, so that I can't go above it, hiding the elements of the scene, but i can't figure out how to do that if you even can. Inversely I don't think that I can move all the tiles down beneath it either can I? It doesn't matter for the purposes of this tutorial, but for my reference going forward i'd love to hear any suggestions! Thanks in advance!

    • @coocool92
      @coocool92 8 месяцев назад

      had this same problem

    • @hollowtongue
      @hollowtongue 8 месяцев назад +1

      @@coocool92 after further tinkering I realized it has to do with the y sort layer origin not the world. However if you move that origin it fucks up the ysort, so I guess just going forward if I want to use this method instead of making instanced scenes i have to draw the map beneath that point

    • @coocool92
      @coocool92 8 месяцев назад

      @@hollowtongue oooh thank you, helped me understand what was wrong. At least now we know for the future

    • @hollowtongue
      @hollowtongue 8 месяцев назад +1

      @@coocool92 I'm so glad I could help :) hopefully my information isn't flawed tho I'm still new to this stuff! So use my info as a jumping off point to seek what you need. I will say chatgpt can help figure things out but they need to update it's info for Godot 4 before it can be super useful for this iteration. But it may help at least. Good luck on your dev journey friend!

    • @coocool92
      @coocool92 8 месяцев назад

      @@hollowtongue Good luck to you too!

  • @nils6831
    @nils6831 3 месяца назад

    use the pill shape and, under "transform", turn it by 90 degrees

  • @AstryxAngel
    @AstryxAngel 2 месяца назад

    This is being very helpful \^-^/

  • @dracicidasempronius4754
    @dracicidasempronius4754 4 месяца назад

    Make sure when you are initially making your tiles that you do the shift+drag method for the entire tile that you want to make. I inidivually clicked each tile in an "entitiy" and it did not correctly apply the gravity. I got hung up on the shrub because of that, I was not getting the entire shrub to do the collision for at a time.

  • @bradleyconnolly703
    @bradleyconnolly703 2 месяца назад

    me and the homies LOVE y sorting

  • @Florianbeaujean
    @Florianbeaujean 10 месяцев назад

    Many thanks, this Tutorial helps me a lot

    • @dev-worm
      @dev-worm  10 месяцев назад

      Glad to hear that!

  • @KeyboardKrieger
    @KeyboardKrieger 4 месяца назад

    This feature convinced me to now try out Godot now. Seems so much easier that what I'm used to from Unity.

    • @dev-worm
      @dev-worm  4 месяца назад +1

      goodluck in Godot! if you need any sort of help in Godot then feel free to let me know!

    • @KeyboardKrieger
      @KeyboardKrieger 4 месяца назад

      @@dev-worm thx, maybe I'll come back to that offer later on.
      Currently I finished godots 2D tutorial, now I'll rebuild it on my own.
      After that I'll come back to your tutorial.
      From there on I'm probably good to go. A lot feels very familiar, coming from unity.

  • @saintdark1
    @saintdark1 Год назад

    waiting for the next one!!!

  • @protobeing3999
    @protobeing3999 10 месяцев назад +2

    is there a way to do this with out tile maps? I've basically imitated this using a foreground/background layer, but if there was a way to program it a little more fluidly in a game that does not use tile maps - that would be ideal.

  • @jbn1087
    @jbn1087 8 дней назад +1

    but now you can still walk on top of the cliffs, right?

    • @dev-worm
      @dev-worm  7 дней назад +1

      yes!! if you are on the other side of the collision then you should beable to!

  • @spacetrip7278
    @spacetrip7278 Год назад +27

    im not usually negative but map oh man is the collison explination so bad

    • @pureatheistic
      @pureatheistic 7 месяцев назад +3

      It's not negative if it's helpful. And he's still got some learning to do himself.

    • @hexaldecima6839
      @hexaldecima6839 6 месяцев назад +6

      Haha 😅😅😅
      I think this guy at the time was still getting used to the new update and its changes.

  • @guardian1243
    @guardian1243 8 месяцев назад +1

    Great work on everything! But you missed the collisions of the cliff :(

  • @armyofchickens6062
    @armyofchickens6062 Год назад +2

    how would you set the y sorting origin if im using a 2d body for my trees? (for chopping down animation is y I set it to a 2D body

  • @ozziepants4963
    @ozziepants4963 Месяц назад

    When I have z index = 1 in my y_sort layer and z index = 0 in every other layer / node, suddenly the physics layer doesn't work. When all of my z index numbers are set to 0 (and "y sort enabled" is selected in my world, tilemaps and player nodes), it suddenly works. Not sure why, but thought I'd put that out there in case someone else ran into the same issue.

  • @FateflyYip
    @FateflyYip 4 месяца назад

    i messed with the Y-Sort enabled setting. To hide behind the elements you have configured, you just need to enable “cliff" on TileMap, Ordering, and World.

  • @davildur
    @davildur 6 месяцев назад +1

    hi, i have some problem and i dont know how to solve it. When i'm selecting the tiles to ysort they do not fit into one but are divided. Can someone help please?

  • @pawsomelabrastead9244
    @pawsomelabrastead9244 9 месяцев назад

    Started watching your series to learn how to program a game, and so far its been very helpful. However, in this video you have the same warning on your tile map that says "a y-sorted layer has the same Z-index value as a not Y-sorted layer" and I can't figure out how to remove that. The problem that I'm having now is everything above the X axis line is Y-sorted and my char is walking behind it all. I do have all my trees and rocks and whatnot on their own layer, and everything below the X-Axis and left/right of Y-axis line are working as intended. I'm confused, if ya see this, could you attempt to assist with the issue, thanks!

    • @whitedovedown5266
      @whitedovedown5266 8 месяцев назад

      Same issue im having.. Idk how to fix that

    • @pawsomelabrastead9244
      @pawsomelabrastead9244 8 месяцев назад

      Actually figured it out, each layer has a Z-Index, and you have set them in correlation to your character. Basically make your char a higher # so it walks on top of everything, but higher than your character if ya need to go under it, then Y-Sorting for going behind.
      Its confusing especially if you're building with an X-axis for each layer of tiles but if ya play around and test with it, you'll get it. @@whitedovedown5266

    • @oliviermavre
      @oliviermavre 6 месяцев назад

      @@whitedovedown5266 you want to set the ysort layer z-index to 1 and also set your player root nodes index to 1 as well

    • @oliviermavre
      @oliviermavre 6 месяцев назад

      you want to set the ysort layer z-index to 1 and also set your player root nodes index to 1 as well

  • @dhruvvashishth3969
    @dhruvvashishth3969 2 месяца назад

    why does it show 2 players at diffrent position both operating simultaneously but one is with ysort and other is not? HELP

  • @masterwgcstudios8764
    @masterwgcstudios8764 Год назад +1

    How would YSorting work between two sprites? For exmaple a player and enemy or player and npc?

  • @ChasingYourCreams
    @ChasingYourCreams 4 месяца назад

    Wasn't sure if I missed something but for the cliffs, do you just have to go in and paint collision on all of them as well?

    • @dev-worm
      @dev-worm  4 месяца назад +1

      or you could put the cliffs you want infront of the player on a different level in the tilemap and increase the z-index so it shows in front of the player

    • @ChasingYourCreams
      @ChasingYourCreams 4 месяца назад

      @@dev-worm didn't even think of that option! Thanks man

  • @zigzag2341
    @zigzag2341 Месяц назад

    why do all tiles share the same physical points config ? My tree and bush have same physical points... and when I change points for bush they also change points for tree...

  • @crashertn4951
    @crashertn4951 4 месяца назад

    When i enabled ysort for the map/node, some objects simply disappeared. Why is that?

  • @lorein_4368
    @lorein_4368 2 месяца назад

    i have a question. If players z index 0 and tilemaps layers 0 and 1. I need to make collision for player for both these layers. How to make it?

  • @luckyknot
    @luckyknot 11 месяцев назад +1

    In 1:29 you click on the tree. How do you make an 'object' composed of different tiles like that tree? I find myself adding collision shapes to each individual tiles of the tree trunk, instead of just having one collision shape. Any help is appreciated.

    • @anthoniG
      @anthoniG 10 месяцев назад +1

      It's in his previous video of the playlist.
      To quote Whisping1:
      You need to go world scene -> TileMap, then select TileSet at the bottom, next press Setup. You need to select whole tree as one tile using Shift + drag your mouse with pressed left button. If before tree was selected like separate tiles, you will need to erase these tiles w/ eraser tool. Do not forget to turn eraser off after erasing.

    • @luckyknot
      @luckyknot 10 месяцев назад

      ​@@anthoniG it's quite unintuitive to find it out, I hope they make it more clear on future version. Thanks a lot for the tip!!

  • @FiggsNeughton
    @FiggsNeughton 4 месяца назад

    Sorry for blowing up your notifications with fifteen comments and then erasing them. Basically I was having trouble at multiple points in the process, panicking, commenting, then subsequently figuring it out 😅

    • @dev-worm
      @dev-worm  4 месяца назад +1

      haha!! all good!! glad you were able to figure everything out!!

  • @RuthlessMetalYT
    @RuthlessMetalYT 2 месяца назад

    my character just appears behind the tree both above and below the collider. :S

  • @roboboy_uk
    @roboboy_uk Месяц назад

    im having an issue where when i try to walk in fornt of an object, my player clips through. any got any ideas

  • @DrDaRK____
    @DrDaRK____ 2 месяца назад

    Curious on how you have the tree as 1 giant area you can click and not 9 individual areas like I have it. When I click one of the 9 areas, only that area is shown in the paint properties area, when I continue to click the other areas, only those appear there. How do I make the area 1 large one like you have so I can see the whole tree in the paint properties area? If that makes sense.

    • @dev-worm
      @dev-worm  2 месяца назад +1

      yes so in the tileset editor you can right click on the tiles and delete the existing tiles so you are able to create your own and when you create your own you can click on a area then hold down shift and drag to create a box which will end up being a tile that takes up multiple tile areas. So for you just delete the 9 tiles that make up the tree then hold shift and click and drag mouse to create the bigger tile out of those 9. hope this helps a bit! thanks for reaching out!

    • @DrDaRK____
      @DrDaRK____ 2 месяца назад

      @@dev-worm Ok, i remember that in the previous video but I ignored it because it was already selected haha. Better just follow along with what you are talking about I guess..haha

  • @msmigs1173
    @msmigs1173 4 месяца назад

    okay works but now the player goes behind the tilemap if I go above the tilemap y sort, I can just move the tilemap upwards so far that this wont ever happen but is there a better way?

  • @themageofspace5516
    @themageofspace5516 6 месяцев назад

    why cant my character go infront of objects every object is in front?

  • @micetrap
    @micetrap Месяц назад

    idk if this helps anyone, but for me y sorting worked after i only enabled it for the world and tilemap, not the player.

  • @PunCala
    @PunCala 7 месяцев назад

    I came accross this problem that no tutorial seems to explain, nor do I get any help from the documentation: how to make y sorting work with CharacterBody2Ds. So if I have an enemy or an NPC, I cannot get my player character to go behind them. I've offset the sprites, turned on Y sorting in everything, nothing works. I wonder if it's a problem with the sprites themselves (like having too much empty space below the character or something) or if there's some way to set a Y sort origin for CharacterBody2Ds, but I cannot get it to work.

  • @arshianiyaifar5889
    @arshianiyaifar5889 Год назад

    That was GREAT

  • @depressito
    @depressito 6 месяцев назад

    can't you just accomplish the same by just using the z-index... or is there something I'm missing that might make y-sorting a better approach?

    • @dev-worm
      @dev-worm  6 месяцев назад +1

      yes.. but the player won't go infront or behind the tree... because it'll only either go infront or only behind.. y-sort just changes the z-index based on the y coordinate!

    • @depressito
      @depressito 6 месяцев назад

      @@dev-worm Oh yeah, I didn't notice yesterday because of the collision so I thought the character was in front of the stone with the z-index.. Now that I see that you said the same thing in the video I feel dumb.. Thank you for making this video.

  • @WanderfromSOTC
    @WanderfromSOTC Месяц назад

    Thanks

    • @dev-worm
      @dev-worm  Месяц назад +1

      thank you!! i hope it helped!

  • @whiterabbit3561
    @whiterabbit3561 4 месяца назад

    Thanks for this, great tutorial, but I have an issue where my objects (trees, rocks, stumps etc.) are going behind the grass/ground layer instead of in front of it like in the video and it only seems to happen in the top half of the map, the bottom half is fine. Anyone know how to fix this?

    • @thatguyinaldi9056
      @thatguyinaldi9056 Месяц назад

      im getting the same error where im phasing through tiles aswell.

  • @callmesensei1535
    @callmesensei1535 6 месяцев назад

    currently having an issue of ysorting. I hear alot of people in comment saying they fix it because you can turn on vsorting on player and world. But Ysorting is toward children nodes?Don't really understand what that means

    • @dev-worm
      @dev-worm  6 месяцев назад +1

      y-sorting can only be enabled on those children if the parent node aka the world.. is also y-sort set to true

    • @callmesensei1535
      @callmesensei1535 6 месяцев назад

      @dev-worm of that's the Case maybe player and world is both parent nodes. I will have to check that on my days off

  • @Leveledupclips
    @Leveledupclips 2 месяца назад

    how do you do this if you arent using tile maps ? :(

  • @h-angrygirl
    @h-angrygirl 5 месяцев назад

    Hello, I will use the translator, I apologize if something is not understood, my problem is that I followed the entire tutorial to the letter but when I run the game my person "gets" under the tree trunks, I don't understand, It should be seen completely from the front but it gets underneath, when passing behind it it hides perfectly but the problem is when passing in front

    • @dev-worm
      @dev-worm  5 месяцев назад +1

      is y-sort turned on, on all the nodes? even the parent nodes? and the main scene node? and also are you getting any errors? I really want to help you out so let me know so we can try and solve this!

    • @h-angrygirl
      @h-angrygirl 5 месяцев назад

      ​@@dev-worm Hello, thanks for responding to my comment, I was able to solve it thanks to the comment of the user @Testikillz, he commented the following below, perhaps he has not seen it
      "Can someone explain to me, around 7:00, when we go to the player and do a negative offset of -15 to the Y, what is it doing here specifically? I played and if you don't do this step, the Your character's body will go behind the plants when it is in front. Is this some kind of layering technique? And when I make my own game, will it always be -15 like I set it to?”
      Thanks to this comment I realized that the value -15 was the one I had to set and I couldn't change it, when I put another one I got the error, could you explain to us why -15 was set? thank you

  • @TheAnonymousLemur
    @TheAnonymousLemur 7 месяцев назад

    I'm currently trying to figure out what's wrong. I have Y sort on the tilemap and the layers I need it on for. Did the origin point, collision boxes, y sort on the player, but the player is still appearing on top of the trees.

    • @TheAnonymousLemur
      @TheAnonymousLemur 7 месяцев назад +1

      As it turns out, if I waited a couple more seconds, you mention turning it on for the world. When I did that, it worked.

    • @dev-worm
      @dev-worm  7 месяцев назад +1

      haha glad to hear!

  • @EC___
    @EC___ Год назад +1

    I'm having a problem with the Ysort of the character... it works when walking behind, but in front; his head is painted behind the object as well.

    • @kruchynix9639
      @kruchynix9639 Год назад

      you found any solution?

    • @kuivapastelli
      @kuivapastelli Год назад +3

      It's not exactly the clearest thing how the Y Sort works.
      However, here are the settings I used to get it working myself.
      Y Sort Enabled:
      world > Ordering: true
      TileMap > Layers > ysort: true
      TileMap > Ordering > true
      player > Ordering > false
      player > AnimatedSprite2D > Ordering and CollisionShape2D > Ordering: does not matter

    • @Alex002c
      @Alex002c Год назад +1

      You may not have set the offset of the player so that his sorting indicator is at his feet. Have a look at 6:40 onward

    • @CallumJones92
      @CallumJones92 Год назад

      @@Alex002c Ah, thank you! I missed that it was 'y' offset and not just moving the sprite upwards.

    • @meruginger934
      @meruginger934 Год назад

      @@kuivapastelli that was the solution for me....

  • @dh.bricks
    @dh.bricks 4 месяца назад

    I set everything to Y-sort. I made the Y-sort origin. I made the separate layer for the tilemap. Is there something I am missing ? (edit was grammar)

    • @dh.bricks
      @dh.bricks 4 месяца назад

      i fixed it, i had to set the tilemaps ordering z index to be the same as the player. I also had to put my y origin at the top of my 16x16 tile by setting it to -8

  • @ajiththiyar7609
    @ajiththiyar7609 8 месяцев назад

    even after doing a lot of mumbo jumbo I couldnt figure out how to do the y-sort thing, I'll be glad if anyone could help me

  • @funnykids66
    @funnykids66 8 месяцев назад

    Make sure your Z index on layers are set to 0

    • @sebastianfelipelemussanche2014
      @sebastianfelipelemussanche2014 7 месяцев назад

      only the layers with y sorting, the background and others layer without y sorting can have other z index

  • @legendaryredfox
    @legendaryredfox Год назад +1

    Nice video! But I think you left out the cliff part

    • @dev-worm
      @dev-worm  Год назад +2

      ohhhh. thats on me... my bad. the cliff would just be a collision shape at the bottom of it so you cant just walk up it, no ysort or zindex needed just a simple collisionshape at the bottom

    • @legendaryredfox
      @legendaryredfox Год назад

      @@dev-worm Thanks! :D

  • @Korn1holio
    @Korn1holio 5 месяцев назад

    The fiddling with collision shape and player offset is quite confusing..

    • @dev-worm
      @dev-worm  5 месяцев назад +1

      just try and put the foot or bottom of the player at 0,0

    • @Korn1holio
      @Korn1holio 5 месяцев назад

      @@dev-worm thank you, and for your tutorials as well!