summaryrefslogtreecommitdiffstats
path: root/Ship.gd
diff options
context:
space:
mode:
authordusoleil <howcansocksbereal@gmail.com>2022-09-15 10:28:24 -0400
committerdusoleil <howcansocksbereal@gmail.com>2022-09-15 10:28:24 -0400
commita2c28a27280c186c2717f303ef52a865da6dd94f (patch)
tree24c862acddc9ff0b705bf00c53c8affe3d8c5c85 /Ship.gd
parent79a4d45d970a2cb44baee39aeff6294cb3156c01 (diff)
downloadgodot_wildjam_49-a2c28a27280c186c2717f303ef52a865da6dd94f.tar.gz
godot_wildjam_49-a2c28a27280c186c2717f303ef52a865da6dd94f.zip
Update movement scripts after Main scene reorganization merge
Diffstat (limited to 'Ship.gd')
-rw-r--r--Ship.gd8
1 files changed, 8 insertions, 0 deletions
diff --git a/Ship.gd b/Ship.gd
new file mode 100644
index 0000000..75f5f63
--- /dev/null
+++ b/Ship.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)