Godot Version
4.3
Question
Hello! Do anyone know how to fix players tile detection when stepped on a specific tile?
Problem
When the player stepps on a specific tile then its detecting the layer thats in under the specific tile’s layer. If i change the layer ID then it will be detecting “null”
Script
Layer 0 is the ground layer, layer 1 is the specific tile’s layer.
(I use classic tilemap)
func _on_area_2d_body_entered(body: Node2D) -> void:
var tileCoords = conveyorTileMap.local_to_map(conveyorTileMap.to_local(position))
var tiledata = conveyorTileMap.get_cell_source_id(1, tileCoords)
print(tiledata)