Fix player reverting back to default position upon first move

This commit is contained in:
2022-07-17 18:48:34 +01:00
parent c6d26f9b77
commit 8abb393949
2 changed files with 4 additions and 2 deletions

View File

@ -26,6 +26,8 @@ func _ready():
for child in get_children():
if child.is_in_group("OnMap"):
child.map_position = $TileMap.world_to_map(child.position)
child.target_position = $TileMap.map_to_world(child.map_position)
child.target_position += $TileMap.cell_size/2
func do_damage_around_player(damage, damage_range):