Unify pod steering on lateral X tilt for flat and frontal holds.
Replace facing-only roll detection with atan2(x, yz) so left/right works in both orientations without a face gate. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -250,7 +250,7 @@ func _on_client_selection_changed(_idx: int) -> void:
|
||||
setup_hint_label.text = "Links und rechts müssen verschiedene Pods sein."
|
||||
else:
|
||||
setup_hint_label.text = (
|
||||
"Pod #%d links · Pod #%d rechts · frontal halten, Lenkrad drehen"
|
||||
"Pod #%d links · Pod #%d rechts · kippen oder Lenkrad drehen"
|
||||
% [_left_client_id, _right_client_id]
|
||||
)
|
||||
|
||||
@@ -284,7 +284,7 @@ func _begin_playing() -> void:
|
||||
_enable_both_streams()
|
||||
_update_score_labels()
|
||||
status_label.text = (
|
||||
"Pod frontal halten · wie Lenkrad drehen · Tap = Boost (%ds)"
|
||||
"Pod halten · links/rechts kippen oder Lenkrad · Tap = Boost (%ds)"
|
||||
% int(BOOST_DURATION_SEC)
|
||||
)
|
||||
|
||||
@@ -694,10 +694,9 @@ func _update_stars(delta: float) -> void:
|
||||
|
||||
|
||||
func _effective_accel(side: int) -> float:
|
||||
# Frontal halten, Lenkrad-Roll: links positiv → Schiff nach links (negativ).
|
||||
# Lateral +X → Schiff nach rechts (flach kippen und frontal Lenkrad).
|
||||
var a := _accel_for_side(side)
|
||||
var roll := OrientationGizmo.steer_roll(Vector3(a))
|
||||
return -roll * STEER_GAIN
|
||||
return OrientationGizmo.steer_roll(Vector3(a)) * STEER_GAIN
|
||||
|
||||
|
||||
func _velocity_scale(side: int) -> float:
|
||||
@@ -734,7 +733,7 @@ func _update_connection_status() -> void:
|
||||
match _socket.get_ready_state():
|
||||
WebSocketPeer.STATE_OPEN:
|
||||
status_label.text = (
|
||||
"Frontal halten · Lenkrad drehen · Tap = Boost (%ds) · ♥×%d · CD %ds"
|
||||
"Kippen / Lenkrad · Tap = Boost (%ds) · ♥×%d · CD %ds"
|
||||
% [int(BOOST_DURATION_SEC), MAX_LIVES, int(BOOST_COOLDOWN_SEC)]
|
||||
)
|
||||
WebSocketPeer.STATE_CONNECTING:
|
||||
|
||||
Reference in New Issue
Block a user