Hi All and happy Easter!
I am using
intersect_ray to capture collision points with my grid map (for point and click movement).
I want to detect gridmap tiles underneath the mouse. I've found a method called
get_cell_item but cannot get it to work.
hovered_point is returned by the
intersect_ray method (i'm using position). I get invalid get index 'position' on base 'Dictionary'. I'm guessing this is referring to 'position' being a field in the intersect_ray dictionary and I am able to reference it in other parts of the code, but not here... How does
get_cell_item really work?
var hovered_point = (raycast from mouse collision point).position
var hovered_tile = gridmap.get_cell_item(hovered_point.x, hovered_point.y, hovered_point.z)