Code/SbTween/Examples/SbeCubeCurve.cs

A small example component that tweens the owning entity's position to a target over 5 seconds using a configurable Curve and loops indefinitely.

Reflection
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();
	}
}