diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-02-08 21:49:04 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-02-08 21:49:04 -0500 |
commit | 2ce58f86aa74f1fd904690cb3ba3438bee4b765f (patch) | |
tree | d2c180fee4219a9ebf1e7bbc39d1312af1f95056 /racing/player.gd | |
parent | 18868c978b56e14f11a700c33fe8572fd953a16f (diff) | |
download | lingo-race-2ce58f86aa74f1fd904690cb3ba3438bee4b765f.tar.gz lingo-race-2ce58f86aa74f1fd904690cb3ba3438bee4b765f.tar.bz2 lingo-race-2ce58f86aa74f1fd904690cb3ba3438bee4b765f.zip |
start spin, not in ground
Diffstat (limited to 'racing/player.gd')
-rw-r--r-- | racing/player.gd | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/racing/player.gd b/racing/player.gd new file mode 100644 index 0000000..95220c1 --- /dev/null +++ b/racing/player.gd | |||
@@ -0,0 +1,19 @@ | |||
1 | extends "res://scripts/player.gd" | ||
2 | |||
3 | |||
4 | func _unhandled_input(event): | ||
5 | ._unhandled_input(event) | ||
6 | |||
7 | # Checks specifically for *not* playable. On purpose. | ||
8 | if event is InputEventMouseMotion and !playable and !solving: | ||
9 | rotate_y(-event.relative.x * mouse_sensitivity) | ||
10 | if global.invert_y_axis: | ||
11 | pivot.rotate_x(event.relative.y * mouse_sensitivity) | ||
12 | else: | ||
13 | pivot.rotate_x(-event.relative.y * mouse_sensitivity) | ||
14 | pivot.rotation.x = clamp(pivot.rotation.x, -1.5, 1.5) | ||
15 | |||
16 | |||
17 | func _solving(): | ||
18 | if playable: | ||
19 | ._solving() | ||