Rewriting ships: Movement system

This commit is contained in:
2ndbeam 2024-04-28 18:53:09 +03:00
commit e2b9fa6c69
10 changed files with 208 additions and 0 deletions

View file

@ -0,0 +1,8 @@
extends Node2D
## Shortcut to get_parent()
@onready var ship: Ship = get_parent()
func _physics_process(_delta):
ship.engine.acceleration_axis = Input.get_axis("deccelerate", "accelerate")
ship.engine.rotation_axis = Input.get_axis("rotateleft", "rotateright")