Open cbscribe opened 3 years ago
Thanks for sharing this extra useful tutorial. There is only a typo in the code where:
if grid.get_rect().has_point(obj_pos + grid.rect_position)
returns the points inside the grid's rect, but you are then hiding the markers inside, while they should be shown. So it needs a not (!) operator before condition:
if ! grid.get_rect().has_point(obj_pos + grid.rect_position):
markers[item].hide()
or change the statement afterwards to show():
if ! grid.get_rect().has_point(obj_pos + grid.rect_position):
markers[item].show()
However it's correct in the video version and this consistency only exist in the written version.
Discussion for http://godotrecipes.com/ui/minimap/