diff --git a/addons/fpc/character.gd b/addons/fpc/character.gd index 738783c..760895d 100644 --- a/addons/fpc/character.gd +++ b/addons/fpc/character.gd @@ -57,6 +57,8 @@ extends CharacterBody3D @export var view_bobbing : bool = true @export var jump_animation : bool = true @export var pausing_enabled : bool = true +@export var gravity_enabled : bool = true + # Member variables var speed : float = base_speed @@ -139,7 +141,7 @@ func _physics_process(delta): # Gravity #gravity = ProjectSettings.get_setting("physics/3d/default_gravity") # If the gravity changes during your game, uncomment this code - if not is_on_floor(): + if not is_on_floor() and gravity and gravity_enabled: velocity.y -= gravity * delta handle_jumping()