summary refs log tree commit diff stats
path: root/racing/player.gd
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-02-08 21:49:04 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2024-02-08 21:49:04 -0500
commit2ce58f86aa74f1fd904690cb3ba3438bee4b765f (patch)
treed2c180fee4219a9ebf1e7bbc39d1312af1f95056 /racing/player.gd
parent18868c978b56e14f11a700c33fe8572fd953a16f (diff)
downloadlingo-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.gd19
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 @@
1extends "res://scripts/player.gd"
2
3
4func _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
17func _solving():
18 if playable:
19 ._solving()