Godot Version
4.2
Hi, everybody! It’s a very simple question, I am trying to get atlas coords by clicking on a tile and it works fine but when I click on a tile that takes multiple tiles, it only works when I click on the texture origin of the tile as designed in the TileSet.
I can’t even imagine why it is happening so any help will be greatly appreciated. Here’s my code if it helps. Cheers!
func _input(event):
if event is InputEventMouseButton:
if Input.is_action_just_released("MouseLB"):
var tile_pos = Vector2(floor(cur_mouse_pos.x / 20), floor(cur_mouse_pos.y / 20))
var atlas_coords = self.get_cell_atlas_coords(2,tile_pos)
print(atlas_coords)