code/PlatformTest.cs

A small Sandbox component named PlatformTest that moves its entity along the world X axis in OnFixedUpdate using a sinusoidal velocity based on Time.Now and Time.Delta. It is marked Hide and has an unused commented alternative to move on Y axis.

using Sandbox;

[Hide]
public sealed class PlatformTest : Component
{
    protected override void OnFixedUpdate()
    {
        WorldPosition += Vector3.Right * (float)Math.Sin(Time.Now * 2f) * 400f * Time.Delta;
        //WorldPosition += Vector3.Up * (float)Math.Sin(Time.Now * 2f) * 200f * Time.Delta;
    }
}