Files
Factory47/Objects/Scripts/SGauge.gd
2026-06-04 16:53:41 -05:00

11 lines
280 B
GDScript

extends Node3D
@export var Value : int
func _process(delta: float) -> void:
# 1. Remap the value
var degree_value: float = remap(Value, 1.0, 100.0, 360.0 - 20, 25)
# 2. Assign a fresh Vector3 to rotation_degrees
$Node3D2.rotation_degrees = Vector3(0.0, degree_value, 0.0)