Changed to vehicle sensor instead of single sensor types
This commit is contained in:
@@ -12,10 +12,9 @@ func _ready() -> void:
|
||||
if north_deg == null:
|
||||
north_deg = 0.
|
||||
north_rad = deg_to_rad(north_deg)
|
||||
Signals.heading_updated.connect(_on_heading_updated)
|
||||
indicator = get_node("CompassIndicator")
|
||||
|
||||
func _on_heading_updated(sensor_ip: String, heading_rad: float):
|
||||
if not check_valid_sensor(sensor_ip, "MAG"):
|
||||
func _update_data():
|
||||
if indicator == null:
|
||||
return
|
||||
indicator.rotation = north_rad + heading_rad
|
||||
indicator.rotation = host_vehicle.heading_rad
|
||||
|
||||
Reference in New Issue
Block a user