From 72586ea6f2e83944d5e90f6e8f4f83a115cb6300 Mon Sep 17 00:00:00 2001 From: Victor Turgeon Date: Tue, 11 Oct 2022 10:08:50 -0400 Subject: [PATCH] stronger gravity faster player --- Player.gd | 6 ++++-- project.godot | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Player.gd b/Player.gd index c609314..9a3465f 100644 --- a/Player.gd +++ b/Player.gd @@ -1,10 +1,11 @@ extends KinematicBody -export var speed = 20 +export var speed = 40 + export var h_acceleration = 6 export var air_acceleration = 1 export var normal_acceleration = 6 -export var gravity = 40 +export var gravity = 100 export var jump = 30 export var mouse_sensitivity = 0.03 @@ -63,6 +64,7 @@ func _physics_process(delta): direction -= transform.basis.x elif Input.is_action_pressed("move_right"): direction += transform.basis.x + direction = direction.normalized() h_velocity = h_velocity.linear_interpolate(direction * speed, h_acceleration * delta) diff --git a/project.godot b/project.godot index 86ff65e..a636b1e 100644 --- a/project.godot +++ b/project.godot @@ -50,6 +50,11 @@ uncapture_mouse={ "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777240,"physical_scancode":0,"unicode":0,"echo":false,"script":null) ] } +sprint={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777237,"physical_scancode":0,"unicode":0,"echo":false,"script":null) + ] +} [physics]