How to Create YSORTING in Godot 4

Поделиться
HTML-код
  • Опубликовано: 23 дек 2024

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

  • @AndrewFio6661
    @AndrewFio6661 Месяц назад +11

    for 2024 people that want to apply these, TileMap is marked as deprecated, SO use TileMapLayer (each tile map layer you add is equals to a layer basically, activate ySorting FOR the one you want to be applied to, same settings as in the video, just apply to each individual TileMapLayer element), if u use multi layer, when editing the colision shape, press the eye next to your TileMapLayers to hide / show elements you used with that layer so you actually apply to the layer's elements you added, speaking from experience here, i added collision shapes to layerOne instead of LayerTwo and i was confused why no collision shapes appeared. AND if you wanna se you shapes while debuging, click on the Debug (top left next to Settings / Project etc) and check the Vissible Collision shape option to see them permanently)

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

      very helpful!! pinning this now!! thank you so much for pointing that out!

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

      @@dev-worm no, thank you for this awesome tutorial mate!

  • @fancycactus234
    @fancycactus234 Год назад +54

    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 Год назад +5

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

    • @WeirdBrainGoo
      @WeirdBrainGoo 11 месяцев назад +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 8 месяцев назад +4

      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 8 месяцев назад

      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) ?

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

    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 - + * /

    • @cleverballoon6535
      @cleverballoon6535 19 дней назад +1

      Its actually amazing how much software have this built in. Like I do all my pixel art in gimp and every single entry box with a numeric value abides by this so I can multiply the canvas size!

  • @Milham-hg7hf
    @Milham-hg7hf 8 месяцев назад +45

    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 7 месяцев назад +3

      My champion.

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

      Thank you! Clicking forever finding the box I missed.

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

      thank you

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

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

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

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

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

    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 4 месяца назад +2

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

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

      Thank youuu my enemy was clipping under while the player was not, turning the tilemap z index to 0 solved it :)

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

      a little extra tips maybe for those who have tried and still haven't succeeded
      you could go to the Tileset at the Visibility menu and make sure the the top level is on

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

      YOU ARE MY JESUS i was stuck for an hour thank you so much i owe you my newborn

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

      @@NUUHYUUH newborn you say hmm

  • @SissyAreil
    @SissyAreil Год назад +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.

  • @kizzle_mi_nizzle6069
    @kizzle_mi_nizzle6069 Год назад +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!

  • @Aelux5216
    @Aelux5216 10 месяцев назад +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 10 месяцев назад

      I had the same problem ! Thank you.

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

      Wow, just that I was looking for!

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

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

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

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

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

      Thanks!

  • @miadietrich7347
    @miadietrich7347 Год назад +35

    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 11 месяцев назад +5

      THANK YOU!

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

      Thanks.

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

      Thank you!

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

      Good thinking, thanks :D

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

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

  • @DeAndrewDaniel
    @DeAndrewDaniel Год назад +29

    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 Год назад +3

      I am sorry what is root node

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

      @@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 10 месяцев назад +4

      This commentary helped someone.
      Thank you.

    • @lyingpancake95
      @lyingpancake95 7 месяцев назад +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 5 месяцев назад

      Thank you :)

  • @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 9 месяцев назад

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

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

    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 Год назад +16

      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 Год назад +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

      @@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 Год назад +10

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

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

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

  • @benhawy
    @benhawy 7 месяцев назад +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  7 месяцев назад

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

  • @tuckerwoollard2613
    @tuckerwoollard2613 7 месяцев назад +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  7 месяцев назад

      thanks for pointing that out!

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

    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!

  • @KillerGameDev
    @KillerGameDev Год назад +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. :)

  • @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

  • @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 10 месяцев назад +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 9 месяцев назад +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

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

    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)

  • @keithestanol3771
    @keithestanol3771 Год назад +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!

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

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

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

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

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

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

  • @alphaios7763
    @alphaios7763 10 месяцев назад +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!

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

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

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

      Glad I could help lol!

  • @luckyknot
    @luckyknot Год назад +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 Год назад +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 Год назад

      ​@@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!!

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

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

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

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

  • @akunbora
    @akunbora 5 месяцев назад +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.

  • @RG-ef8vm
    @RG-ef8vm 9 месяцев назад +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 5 месяцев назад

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

  • @makermatt93
    @makermatt93 8 месяцев назад +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  8 месяцев назад

      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 5 месяцев назад

      @@dev-worm yes, you should!

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

    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  11 месяцев назад

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

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

    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

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

    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.

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

    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  9 месяцев назад

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

  • @user-yf4gx6oq2t
    @user-yf4gx6oq2t 2 месяца назад +1

    NOTE: godot made so many updates and stuff, and this guy missed some stuff, so basically, aftter you create your layers and stuff, there are 2 important things to know, first is the Z index and Y sort, it kinda takes long to explain but, basically go to your world and layers, and make sure that the Z index of the layers are lower than the "player" z index, at default all should be 0, just go and make the player z index 2, and for the Ysort layer make its Z index 1, and thats all to fix it

  • @cleverballoon6535
    @cleverballoon6535 19 дней назад

    Just an extra note I spend a couple days trying to solve,
    1: The layers that we are moving around have to have the same Z index. Be super careful to account for relative Z indexing, both the player and object need to have the same absolute Z index.
    2. EVERY parent of anything using y sorting NEEDS to have Y sorting on. I got stuck for a few days because I never turned y sorting on in the root scene itself. I mean granted this seems dumb as why would it need Y sorting if its not the actual object moving around, just some of its children are.

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

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

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

    JUST MOVE THE COLLISION SHAPE WITH YOUR MOUSE IT'S NOT THAT HARD OMLLLLL
    BRO TAKES FIVE HOURS TO GET TO THE DAMN YSORT

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

    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  7 месяцев назад

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

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

    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.

  • @smeeman8569
    @smeeman8569 18 дней назад +1

    for me my head goes behind the tree when i am beneath whilst the rest of the body is in front of the tree so is this normal and do you go over ir later or did i do something wrong thanks

    • @dev-worm
      @dev-worm  17 дней назад

      I don't exactly remember what I cover here but recently I created a much more updated y-sorting video, but it sounds like your y-sort origin is offset weirdly.

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

    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  Год назад

      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.

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

    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.

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

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

    • @dev-worm
      @dev-worm  4 месяца назад +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 4 месяца назад

      @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.

  • @НиколайИванов-с3ш1л

    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

    • @НиколайИванов-с3ш1л
      @НиколайИванов-с3ш1л Год назад +1

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

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

    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  8 месяцев назад +1

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

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

      @@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.

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

    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  5 месяцев назад

      very good point!

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

    this is a very helpful tutorial! thanks!

  • @protobeing3999
    @protobeing3999 Год назад +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.

  • @davildur
    @davildur 10 месяцев назад +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?

  • @hollowtongue
    @hollowtongue Год назад +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 Год назад

      had this same problem

    • @hollowtongue
      @hollowtongue Год назад +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 Год назад

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

    • @hollowtongue
      @hollowtongue Год назад +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 Год назад

      @@hollowtongue Good luck to you too!

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

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

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

    When i made all of the collisions of the trees, bushes and other objects my player just won't move. Anybody know how to fix?

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

    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.

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

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

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

      glad it was all able to come together!

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

    bro im stuck at 1:13 i did't have physics layers

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

      sry i see what the problem was

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

      @@tbelev12what is it? I'm stuck here too
      Edit: clicking on TileMap does it. And to think that I once tried to follow the tutorial but somehow thought changing the rendering engine to Forward+ would fix this (instead I got locked out of my project file because I somehow can't update my video drivers on this old laptop I'm using). Trying to follow the tutorial again after nearly two months of studying. The answer was right there lol.

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

      @@tbelev12 so what was the problem?

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

      ​@@tbelev12 What's the problem? I'm stuck on this part too

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

      ​@@gcpa7539Did you discover the problem?

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

    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 5 месяцев назад

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

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

    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  9 месяцев назад +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 9 месяцев назад

      ​@@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

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

    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 Год назад

      Same issue im having.. Idk how to fix that

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

      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 10 месяцев назад

      @@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 10 месяцев назад

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

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

    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?

  • @EriGab99
    @EriGab99 Год назад +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....

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

    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...

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

    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.

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

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

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

    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  6 месяцев назад +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____ 6 месяцев назад

      @@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

  • @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

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

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

  • @12anjo
    @12anjo Год назад

    Perfect series, Perfect video

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

    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?

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

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

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

    Very Chill explanation, love it

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

    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  8 месяцев назад +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 8 месяцев назад

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

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

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

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

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

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

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

  • @mickauls_
    @mickauls_ 6 месяцев назад +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  6 месяцев назад

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

    • @BenBevan66
      @BenBevan66 4 месяца назад +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!

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

    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  10 месяцев назад +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 10 месяцев назад

      @@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.

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

    1:44 and 8:09 I honestly didn't understand how you got 1 square y and I have all the squares separate, how can I fix it?

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

      aye man, 6 months later but go back to your tileset, delete the squares with the eraser and select the objects while holding shift+ctrl and mouse drag.

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

    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 10 месяцев назад +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  10 месяцев назад +1

      haha glad to hear!

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

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

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

    there is godot 4.4 and tile map is not working so i work on tilemaplayers this doesnt work for ysorting for me

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

    amazing tutorials bro keep it up

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

      thanks brother!

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

    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  9 месяцев назад +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

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

    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.

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

    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  9 месяцев назад +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 9 месяцев назад

      @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

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

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

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

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

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

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

  • @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 Год назад

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

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

      @@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 10 месяцев назад

      thanks i was stuck on this too :)

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

    it did help... tysm!

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

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

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

    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  7 месяцев назад +1

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

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

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

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

    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)

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

      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

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

    Many thanks, this Tutorial helps me a lot

  • @sabewalker4715
    @sabewalker4715 11 дней назад

    I do not have physics layers as an option like he does, anyone know why?

    • @dev-worm
      @dev-worm  День назад

      it might be because of the new Godot 4 update. As a lot of things have changed. I actually created a pretty recent tutorial on y-sorting for Godot 4.3 so that may help!

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

    when I enable y sorting the player is behind the ground or map layer. How do I fix this?

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

      you may have y-sorting turned on on another of your layers (i guess your base layer). I had a similar thing going on.

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

    Painting the Y Sort Origin doesnt seem to work, i cant select any tile and adjusting the value does nothing.

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

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

  • @irusher.gaming
    @irusher.gaming 8 месяцев назад

    How i can do this for Enemy, he use animated sprite 2D

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

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

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

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