feat: Implement player movement manager for grid-based movement, rotation, and complex player interactions including pushing and environmental checks.

This commit is contained in:
Yogi Wiguna
2026-03-13 10:19:38 +08:00
parent 200e198428
commit 6242c4e37e
+5 -2
View File
@@ -533,8 +533,11 @@ func _is_path_blocked_by_physics(from_grid: Vector2i, to_grid: Vector2i) -> bool
var path_result = space_state.intersect_ray(path_query)
if path_result:
if path_result.collider != player:
# This correctly hits thin walls placed on tile boundaries
return true
# Ghost mode can bypass physical thin walls like Safe Zone walls
if player.get("is_invisible") and (path_result.collider.is_in_group("SafeZoneWalls") or path_result.collider.name.begins_with("Wall")):
pass
else:
return true
# 2. Target tile occupancy check: Block if a static object is in the middle of the tile
var target_from = Vector3(to_grid.x + 0.5, 1.0, to_grid.y + 0.5)