I have followed your beginner tutorial on the fps controller, however, the jump is now limited to a tiny hop, I think it might be because of the lerp() function used, so i am requesting you have a look at this code plez
extends CharacterBody3D
@export var current_speed = 5.0
@export var corrent_jumpV = 4.5
@onready var head = $head
@export var speed = 5.0
@export var sprinting_speed = 10.0
@export var crouching_speed = 3.0
@export var jump_velocity = 4.5
@export var sprinting_jumping_velocity = 3
sets amounts oftime you can jump while in the air, 0 will mean player can jump once
@export var Double_jump = 3
var Double_jump_delta = Double_jump
@export var mouse_sense = 0.4
@export var lerp_speed = 10.0
var direction = Vector3.ZERO
Get the gravity from the project settings to be synced with RigidBody nodes.
var gravity = ProjectSettings.get_setting("physics/3d/default_gravity")
I have followed your beginner tutorial on the fps controller, however, the jump is now limited to a tiny hop, I think it might be because of the lerp() function used, so i am requesting you have a look at this code plez
extends CharacterBody3D
@export var current_speed = 5.0 @export var corrent_jumpV = 4.5
@onready var head = $head
@export var speed = 5.0 @export var sprinting_speed = 10.0 @export var crouching_speed = 3.0 @export var jump_velocity = 4.5 @export var sprinting_jumping_velocity = 3
sets amounts oftime you can jump while in the air, 0 will mean player can jump once
@export var Double_jump = 3 var Double_jump_delta = Double_jump @export var mouse_sense = 0.4 @export var lerp_speed = 10.0
var direction = Vector3.ZERO
Get the gravity from the project settings to be synced with RigidBody nodes.
var gravity = ProjectSettings.get_setting("physics/3d/default_gravity")
func _ready(): Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
func _input(event): if event is InputEventMouseMotion: rotate_y(deg_to_rad(event.relative.x -mouse_sense)) head.rotate_x(deg_to_rad(event.relative.y -mouse_sense)) head.rotation.x = clamp(head.rotation.x,deg_to_rad(-98),deg_to_rad(98))
func _physics_process(delta):