k/Common/ConstraintsBase.cs
namespace Sandbox.k.Common;

public class ConstraintsBase<T> : Component
{
	[Property] public bool IsActive { get; set; } = true;
	[Property, MinMax(0, 1)] public float Weight { get; set; } = 1.0f;
	
	[Property] public GameObject Target { get; set; }
	// [Property, InlineEditor] public ConstraintsSettingsBase<T> Settings { get; set; }
	[Property] public T Offset { get; set; }
	
	protected override void OnUpdate()
	{
		if ( !IsActive ) return;
		OnConstraintUpdate();
	}

	public virtual void OnConstraintUpdate()
	{
	}
}