s&
About
The Project
infoAbout s&box mapRoadmap monitoringMetricsEngine startup and usage numbers
Updates
newspaperLatest News
jams
Workshop
Steam
open_in_newSteam Workshop
Assets
view_in_arModels textureMaterials apparelClothing
Forum
Learn
Documentation
rocket_launchGetting Started docsDocumentation apiAPI Reference
Resources
schoolTutorials manage_searchCode Search
Get s&box
Sign in with Steam
Shrimple Character Controller
Released
A shrimple yet versatile character controller/move helper that performs great
by Small Fish library
updated 5 months ago
1.6MB
thumb_up_alt25 thumb_down_alt1 favorite24 library_books2
homeDetailsnewspaperNewscodeSource
folder.obj
description__compiler_extra.cs
foldercode
folderExamples
descriptionShrimpleFlyer.cs
descriptionShrimpleRoller.cs
descriptionShrimpleWalker.cs
folderUtil
folderExtensions
descriptionVector3Extensions.cs
descriptionAssembly.cs
descriptionPlatformTest.cs
descriptionShrimpleCharacterController.cs
descriptionShrimpleCharacterController.Physical.cs
descriptionShrimpleCollisionResult.cs
folderExamples
descriptionShrimpleFlyer.cs
descriptionShrimpleRoller.cs
descriptionShrimpleWalker.cs
folderUtil
folderExtensions
descriptionVector3Extensions.cs
descriptionAssembly.cs
descriptionPlatformTest.cs
descriptionShrimpleCharacterController.cs
descriptionShrimpleCharacterController.Physical.cs
descriptionShrimpleCollisionResult.cs
PlatformTest.cs

A small game component for Facepunch s&box that moves its entity horizontally in FixedUpdate using a sinusoidal offset applied to WorldPosition.

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;
    }
}
Facepunch
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter