SbTween/Examples/SbeCubeCurve.cs

A small example component that starts a looping tween on start. It exposes a targetPosition and a Curve property, then calls TweenMove to move the entity to the target over 5 seconds using the provided curve and infinite loops.

Native Interop
using Sandbox;

namespace SbTween.Examples;

public sealed class SbeCubeCurve : Component
{
	[Property] public Vector3 targetPosition;
	[Property] public Curve TweenCurve;

	protected override void OnStart()
	{
		this.TweenMove( targetPosition, 5 ).WithCurve( TweenCurve ).SetLoops(-1).Play();
	}
}