#How do i add a dash system

1 messages · Page 1 of 1 (latest)

deep shell
#

working on a 3D Speedrun and need to make dash mechanic,sorry for bad english
if Input.is_action_pressed("Dash") and can_dash:
velocity.z = direction.z * 1000
print("DASH")
can_dash = false
await get_tree().create_timer(1.0).timeout
can_dash = true

dry chasm
#

This looks fine, but you may want to do velocity += -global_basis.z * 1000

global_basis.z is based on where the node is rotated towards, and the - is because Vector3.FORWARD = Vector3(0,0,-1)

With that said, 1000 "meters" in 3D is a VERY big increase. The character will probably leave the level instantly or go trough walls.