Recoil system
This commit is contained in:
parent
1c062489b1
commit
cdfce4c7db
11 changed files with 144 additions and 8 deletions
|
|
@ -64,7 +64,7 @@ func _physics_process(delta: float) -> void:
|
|||
|
||||
# Get the input direction and handle the movement/deceleration.
|
||||
# As good practice, you should replace UI actions with custom gameplay actions.
|
||||
var input_dir := Input.get_vector("plr_strafe_l", "plr_strafe_r", "plr_forward", "plr_back")
|
||||
var input_dir := Input.get_vector("plr_strafe_r","plr_strafe_l", "plr_back","plr_forward")
|
||||
var direction := (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
|
||||
if direction:
|
||||
velocity.x = direction.x * SPEED
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue