@tool class_name SODDebug extends Node @export var _fzr: Vector3 = Vector3(1, 0.15, 2): set(value): _recalculate(value) _fzr = value @export var _graph: Curve = Curve.new() @export var _step: float = 0.2 @export var _duration: float = 6 @export var _change_time: float = 1 @export var _change_value: float = 1 func _recalculate(fzr: Vector3) -> void: _graph.clear_points() _graph.min_domain = 0 _graph.max_domain = _duration _graph.min_value = 0 _graph.max_value = 1.5 var time: float = 0 var x := Vector3.ZERO var sod := SecondOrderDynamics.new(fzr, Vector3.ZERO) while time <= _duration: if time >= _change_time and x != Vector3.UP: x.y = _change_value _graph.add_point(Vector2(time, sod.process(_step, x).y)) time += _step