Untitled

Anonymous
python
01/16/2023 9:42 PM
520 B
53
Indexable
func _physics_process(delta):
	direction.y += gravity_speed * delta + descend_speed * Input.get_action_strength("ui_down")
	
	if(is_on_floor()):
		if(Input.is_action_just_pressed("ui_up")):
			direction.y=jump_speed
	
	direction.x=Input.get_action_strength("ui_right") - Input.get_action_strength("ui_left")
	direction.x *= horizontal_speed
	
	direction=move_and_slide(direction,Vector2.UP)
Editor is loading...