summaryrefslogtreecommitdiffstats
path: root/Ship.gd
blob: 75f5f6325e300c9227a8bc39d0de508c75b117ad (plain) (blame)
1
2
3
4
5
6
7
8
extends RigidBody

export var ang_acceleration = 60.0

func _integrate_forces(_state):
    var stick = Input.get_axis("ship_right","ship_left")
    if stick != 0.0:
        self.add_torque(Vector3.UP*stick*ang_acceleration)