feat: added input update to ui
This commit is contained in:
@@ -34,9 +34,16 @@ func _ready() -> void:
|
||||
target_node = get_node("Target")
|
||||
|
||||
p_input = get_node("PID Menue/PanelContainer/VBoxContainer/Proportinal Term (P)/Input")
|
||||
p_input.value_changed.connect(_update_p_value)
|
||||
|
||||
i_input = get_node("PID Menue/PanelContainer/VBoxContainer/Integral (I)/Input")
|
||||
i_input.value_changed.connect(_update_i_value)
|
||||
|
||||
d_input = get_node("PID Menue/PanelContainer/VBoxContainer/Derivative (D)/Input")
|
||||
d_input.value_changed.connect(_update_d_value)
|
||||
|
||||
force_input = get_node("PID Menue/PanelContainer/VBoxContainer/Force/Input")
|
||||
force_input.value_changed.connect(_update_force_value)
|
||||
|
||||
target_input =get_node("PID Menue/PanelContainer/VBoxContainer/Target Rotation/Input")
|
||||
target_input.value_changed.connect(_update_target_rot)
|
||||
@@ -56,6 +63,17 @@ func _ready() -> void:
|
||||
func _update_target_rot(value:float) -> void:
|
||||
target_node.rotation.x = deg_to_rad(value)
|
||||
|
||||
func _update_p_value(value:float) -> void:
|
||||
p = value
|
||||
|
||||
func _update_i_value(value:float) -> void:
|
||||
i = value
|
||||
|
||||
func _update_d_value(value:float) -> void:
|
||||
d = value
|
||||
|
||||
func _update_force_value(value:float) -> void:
|
||||
force = value
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
# PID Stuff
|
||||
|
||||
Reference in New Issue
Block a user