2022-01-19 13:35:14 +00:00
|
|
|
extends MeshInstance
|
|
|
|
|
|
|
|
export(float) var max_steer_angle = 90
|
|
|
|
|
|
|
|
|
|
|
|
func update_angle(steering_angle_percent: float) -> void:
|
|
|
|
rotation.z = deg2rad(max_steer_angle) * steering_angle_percent
|
|
|
|
|
|
|
|
|
|
|
|
func _on_steering_updated(_steering_angle: float, steering_angle_percent: float) -> void:
|
2022-01-19 14:37:38 +00:00
|
|
|
update_angle(steering_angle_percent)
|