diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2022-09-14 10:35:49 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2022-09-15 08:57:23 -0400 |
commit | cdb6dc3ff78516bdc1b10c2f02ac50973969b749 (patch) | |
tree | 97e144fc1034c123bcd2fffa0e356fba82f8ffb9 /Raft.gd | |
parent | 79b829e35ae65e3c046e7081aeb2557242e93d24 (diff) | |
download | game_jam49-cdb6dc3ff78516bdc1b10c2f02ac50973969b749.tar.gz game_jam49-cdb6dc3ff78516bdc1b10c2f02ac50973969b749.zip |
Pilot ship with arrow keys
Diffstat (limited to 'Raft.gd')
-rw-r--r-- | Raft.gd | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -0,0 +1,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) |