summaryrefslogtreecommitdiffstats
path: root/Raft.gd
diff options
context:
space:
mode:
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)