A team game with an emphasis on movement (with no shooting), inspired by Overwatch and Zineth
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
722 B

  1. extends "res://scripts/player.gd"
  2. const wallride_speed = 0.5
  3. const wallride_speed_necessary = 15
  4. func control_player(delta):
  5. wallride(delta)
  6. .control_player(delta)
  7. func wallride(delta):
  8. # If our feet aren't touching, but we are colliding, we are wall-riding
  9. if is_on_wall() and velocity.length() > wallride_speed_necessary:
  10. var aim = get_node("Yaw").get_global_transform().basis
  11. var direction = Vector3()
  12. if Input.is_action_pressed("move_forwards"):
  13. direction -= aim[2]
  14. if Input.is_action_pressed("move_backwards"):
  15. direction += aim[2]
  16. velocity += direction * wallride_speed
  17. velocity.y = -gravity # So it's undone in super
  18. else:
  19. pass
  20. # We need to return to falling (we aren't riding anymore)