0 votes

So I'm attempting to make a game mechanic that lets the user do specific things when on top of different ground types (think Avatar the last air bender kind of stuff).

So the 2 questions I have are this:

  1. Can you have 2 tileset nodes in one level that don't break when they touch each other? I tried this in a couple of different ways, but the character freaks out when moving on them. I checked the collision and the player character sometimes thinks it doesn't have a ground underneath and sometimes it thinks it has 2 for some reason?! Example - https://gfycat.com/TanWideeyedHedgehog

  2. If it is possible to have 2 tilesets in one level, how can I tell what my character is standing on? So as an example, if I'm on the ice, the fiction would be lower and because isonice would be true, I could allow the use of an ice ability

Also, currently walking into walls also makes my character think it is coming off the ground so this could be a deeper issue :/

Thanks in advance!

asked Jul 5 in Engine by Light (12 points)

You might be able to use different TileSets on different TileMaps if you have the maps use the same collision layers/masks.

1 Answer

0 votes

Hi, I will try to help you.

you could try this several ways, however, to detect the tiles and have different reactionsI I would have the player with 2 raycast and each one with different properties.

regarding the layers, the first layer is what is the object and the mask is the one you want to collide, I would change the names in project setting so you can make it easier.
layer1: player, layer2: world, layer3: enemy
player :layer in player and mask in word and enemy
world : layer in world and enemy
enemy: layer in enemy and mask in player, world and in enemies if you want to collide if not I would not select it.

however the the layer isn't necessary to select one you could unselect all and just select the mask.

I hope it make sense.

good luck

answered Jul 6 by Jorge (198 points)
edited Jul 6 by Jorge
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.