Moving the occluder shape

Godot Version

4.2.2

Question

image
I have this isometric tile set, where I have a wall tile. Bottom layer is floor tiles and second layer is walls, doors etc.
I suspect the orange diamond shape is the occluder shape. The red is of course the collision shape to prevent my player walking trough the wall. However my tiles are based on the bottom of the tile image, so how can I move the orange diamond to the bottom of the tile. Right now if my character move closer to the wall he will be hidden half way up the wall. I want him (when standing below the wall) to not be hidden and when he stand behind/above the wall that he is hidden. I hope you understand the question. If the orange diamond shape is not named occluder shape then please tell me the correct name (as it is impossible to find anything if you don’t know the correct name).
Best regards
Hans

Info from there: https://www.reddit.com/r/godot/comments/frxl49/how_can_i_make_an_isometric_collisionshape2d/

Use a collisionpolygon2d, for tiles you can check out this tutorial, specifically on isometric tilesets and collision shapes.

It is part of an entire playlist on tiles and tilemaps using many isometric examples
https://www.youtube.com/playlist?list=PLZ-54sd-DMAKnV3CoOLFl87DP2piqLQLe


If you’re new to isometric tiles, you definitely should check it :grin:

He is explaining about collision shapes. That I have working.
Also his TileSet viewer is ver different than mine, is he using an older version of GoDot? The old version looks a lot more easy to use and support full screen and you can draw directly in the tiles instead og having to open properties scroll to the bottom and edit the physics polygin there.
He also have Tex offset, Occluder offset and a lot of other offsets that I do not have. This is what mine looks like:

His version is 3.2
If you want to keep open all properties - you just can set it in Editor Settings:
You’ll get this kind of result:

  1. Just click Editor:
    image
  2. Interface → Insperctor → Disable Folding → ON

Old version of godot had much different TileMap but Today it’s much flexible and of course harder to understand where is what if you’re using it first time :sweat_smile:
I rarely use TileMaps, that’s why can’t remember where is this settings - but just google it and it won’t be hard to find what you want, cause Nowadays we have a lot of guides about TileMap in Godot 4

I of course Googled and even asked ChatGPT but did not find an answer. So that was why I hoped some experienced Godot user could help me, how to do this, that was apparently possible in older versions.

I finally found the solution. Selecting the TileMap and in the bottom the TileSet tab. Then select a tile and under Rendering section you can set the Texture Origin to shift the texture compared to the occluder shape and thereby correctly set the “floor” level, and the sprite is now correctly hidden behind walls etc.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.