This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends CharacterBody2D | |
@export var move_speed = 200.0 | |
@export var jump_height : float | |
@export var jump_time_to_peak : float | |
@export var jump_time_to_descent : float | |
@onready var jump_velocity : float = ((2.0 * jump_height) / jump_time_to_peak) * -1.0 | |
@onready var jump_gravity : float = ((-2.0 * jump_height) / (jump_time_to_peak * jump_time_to_peak)) * -1.0 | |
@onready var fall_gravity : float = ((-2.0 * jump_height) / (jump_time_to_descent * jump_time_to_descent)) * -1.0 |
OlderNewer