Godot Version
Godot_v4.1.3 for Windows
Question
How would i accomplish making a jump that takes the horizontal movement velocity and makes your jump that fast? I would know how to do this, but there is one major problem.
var input_dir = Input.get_vector("left", "right", "up", "down")
var direction = (head.transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
if direction:
velocity.x = direction.x * speed
velocity.z = direction.z * speed
else:
velocity.x = 0.0
velocity.z = 0.0
This is the code that does the movement
If we did not set the velocity.x and z to 0, the ground appears to be very slippery
jumping one (simple, really)
isJumping = true
velocity.y = JUMP_VELOCITY
velocity.x = speed;
velocity.z = speed;
Just to let the mods or whoever decides to answer this know, it extends CharacterBody3D
peace