summaryrefslogtreecommitdiffstats
path: root/Raft.gd
diff options
context:
space:
mode:
authordusoleil <howcansocksbereal@gmail.com>2022-09-14 10:35:49 -0400
committerdusoleil <howcansocksbereal@gmail.com>2022-09-15 08:57:23 -0400
commitcdb6dc3ff78516bdc1b10c2f02ac50973969b749 (patch)
tree97e144fc1034c123bcd2fffa0e356fba82f8ffb9 /Raft.gd
parent79b829e35ae65e3c046e7081aeb2557242e93d24 (diff)
downloadgodot_wildjam_49-cdb6dc3ff78516bdc1b10c2f02ac50973969b749.tar.gz
godot_wildjam_49-cdb6dc3ff78516bdc1b10c2f02ac50973969b749.zip
Pilot ship with arrow keys
Diffstat (limited to 'Raft.gd')
-rw-r--r--Raft.gd8
1 files changed, 8 insertions, 0 deletions
diff --git a/Raft.gd b/Raft.gd
new file mode 100644
index 0000000..75f5f63
--- /dev/null
+++ b/Raft.gd
@@ -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)