mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
fixed some weird camera shenanigans with anti-grav
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user