I'm just learning Godot. This works perfectly for a basic character controller, but can someone help me understand why my constant SPEED needs to be set so high for adequate player speed? 10X higher than gravity?
extends KinematicBody2D
var velocity = Vector2()
const SPEED = 10000
const GRAVITY = 1000
const JUMP = 500
func _process(delta):
_get_input(delta)
velocity.y += GRAVITY * delta
velocity = move_and_slide(velocity, Vector2.UP)
func _get_input(delta):
var movement = -int(Input.is_action_pressed("left")) + int(Input.is_action_pressed("right"))
velocity.x = movement * SPEED * delta
if is_on_floor():
if Input.is_action_just_pressed("space"):
velocity.y -= JUMP