mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-10 16:04:04 +00:00
feat(*): Add bot selection, score HUD, and winner reveal to matches, replace HUD text with aircraft-style flight instruments, and fix camera judder
This commit is contained in:
@@ -230,8 +230,12 @@ func _emit_telemetry_data():
|
||||
|
||||
# Attitude telemetry (pitch, roll, yaw from ship orientation)
|
||||
# Physics: Euler angles from rotation matrix
|
||||
# Pitch = rotation around X-axis, Roll = rotation around Z-axis
|
||||
var ship_rotation = global_transform.basis.get_euler(EULER_ORDER_XYZ)
|
||||
# Aviation convention (yaw → pitch → roll, EULER_ORDER_YXZ): pitch stays in
|
||||
# ±90° and yaw covers the full circle. XYZ order would instead constrain
|
||||
# yaw to ±90°, so an upright ship facing "south" would be reported as
|
||||
# pitch 180 + roll 180 — mathematically equivalent, but it reads as
|
||||
# upside-down on the attitude indicator and breaks the heading readout.
|
||||
var ship_rotation = global_transform.basis.get_euler(EULER_ORDER_YXZ)
|
||||
var pitch_deg = rad_to_deg(ship_rotation.x)
|
||||
var roll_deg = rad_to_deg(ship_rotation.z)
|
||||
var yaw_deg = rad_to_deg(ship_rotation.y)
|
||||
|
||||
Reference in New Issue
Block a user