Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Tort | |
Old Version | Published before Godot 3 was released. |
print(grid_map.area_get_name(1))
Error: Condition’area_map.has(p_area)'is true. returned: “”
What does this p_area?
Do you want to get an area or cell?
I don’t know how the area thing works, but if is a cell item name, to obtain it get the name from the MeshLibrary with get_item_name
eons | 2016-12-06 12:56
Thanks!
var cell = get_node('ray_niz').get_collider().get_cell_item(self_pos[0]-0.5, self_pos[1]-1.5, self_pos[2]+0.5)
print(get_node('ray_niz').get_collider().get_theme().get_item_name(cell))
edit:
cell = get_node('ray_niz').get_collider().get_cell_item(round(self_pos[0]), round(self_pos[1]-1), round(self_pos[2]))
Tort | 2016-12-07 13:02
Good! I’ll add it as an answer.
eons | 2016-12-07 15:58