A small game component that moves its entity along a Vector3 offset using the SbTween tweening extension. OnStart it starts a 3-second linear move tween that loops forever with YoYo ping-pong behavior.
using Sandbox;
using SbTween;
namespace SbTween.Examples;
public sealed class SBECubeTL : Component
{
[Property] public Vector3 vectorUP;
protected override void OnStart()
{
this.TweenMove( vectorUP, 3 ).SetEase( EaseType.Linear ).SetLoops(-1, LoopType.YoYo ).Play();
}
}