fixed some weird camera shenanigans with anti-grav

This commit is contained in:
JHDev2006
2025-09-21 19:38:16 +01:00
parent c26bf96dd9
commit b91cfc6471
6 changed files with 23 additions and 23 deletions

View File

@@ -28,6 +28,9 @@ func on_player_entered(player: Player) -> void:
player.low_gravity = enable_low_gravity
player.global_position.y -= 16
player.global_rotation = -player.gravity_vector.angle() + deg_to_rad(90)
player.get_node("CameraHandler").global_rotation = 0
player.get_node("CameraHandler").position.x = 0
player.get_node("CameraHandler").can_diff = false
player.reset_physics_interpolation()
func on_player_exited(player: Player) -> void:
@@ -36,4 +39,5 @@ func on_player_exited(player: Player) -> void:
player.global_position.y += 16
player.velocity.y *= 1.1
player.global_rotation = -player.gravity_vector.angle() + deg_to_rad(90)
player.get_node("CameraHandler").position.x = 0
player.reset_physics_interpolation()