feat: Introduce PlayerMovementManager to manage player movement, rotation, attack mode push mechanics, and grid-based collision detection.
This commit is contained in:
@@ -555,6 +555,13 @@ func find_path(start: Vector2, end: Vector2, floor_index: int = 0, clear_path_vi
|
||||
|
||||
var start_point = start.y * columns + start.x
|
||||
var end_point = end.y * columns + end.x
|
||||
|
||||
if not is_position_valid(Vector2i(int(start.x), int(start.y))) or not is_position_valid(Vector2i(int(end.x), int(end.y))):
|
||||
return []
|
||||
|
||||
if not astar.has_point(start_point) or not astar.has_point(end_point):
|
||||
return []
|
||||
|
||||
path = astar.get_point_path(start_point, end_point)
|
||||
|
||||
if visualize:
|
||||
|
||||
Reference in New Issue
Block a user