diff --git a/godot/player/OnFootPhysics.gd b/godot/player/OnFootPhysics.gd index dafcd97..b0a0661 100644 --- a/godot/player/OnFootPhysics.gd +++ b/godot/player/OnFootPhysics.gd @@ -46,8 +46,6 @@ func process_velocity(delta: float): # Uses the input from MovementInput to compute and update this node's velocity # velocity_acceleration controls gradual speedup whereas velocity_friction # controls gradual slowdown - if Dialogic.get_variable("enable_glide") == "true": - can_glide = true # Gravity # You can buffer jumps by pressing releaseing the space bar and then pressing it again if not is_on_floor(): diff --git a/godot/player/player.gd b/godot/player/player.gd index 69d75dd..46008ec 100644 --- a/godot/player/player.gd +++ b/godot/player/player.gd @@ -35,7 +35,10 @@ func objective_distance() -> float: return $ObjectiveTracker.objective_distance func _process(_delta): + if Dialogic.get_variable("enable_glide") == "true": + can_float = true $OnFootPhysics.can_glide = can_glide $OnFootPhysics.can_float = can_float +