menu_bookDocumentation

Sandbox: Map entities — Door, Button, FuncMover, TriggerPush, TriggerTeleport

calendar_today May 4, 2026 schedule ~2 min read person patrickjr verified 50

Sandbox Map Entities — Door, Button, FuncMover, TriggerPush, TriggerTeleport

These components implement interactive map elements. They live in the Facepunch namespace and use Component.IPressable for player interaction.

Door

Door implements Component.IPressable and animates rotation around a pivot point using an AnimationCurve.
PropertyDefaultDescription
TargetAngle90°How far the door rotates when opened
OpenTime0.5sDuration of open/close animation
OpenAwayFromPlayertrueRotates away from the pressing player
IsLockedfalseSynced — locked doors play LockedSound and don't open
PivotnullOptional pivot GameObject; uses origin if unset
AnimationCurvelinearControls easing of the open/close animation
States: Open, Opening, Closing, Closed

The door fires OnStateChanged (an Action<DoorState>) when state transitions occur. Open/close can be triggered via [ActionGraphNode] RPCs: sandbox.door.open, sandbox.door.close, sandbox.door.toggle.

Button

Button implements Component.IPressable. When pressed, it fires an output event and optionally triggers a linked BaseToggle. Supports a cooldown to prevent rapid re-triggering.

FuncMover

FuncMover moves a GameObject between two positions (or along a path) over time. Used for elevators, sliding platforms, etc. Supports:
  • Linear and curved movement
  • Speed and acceleration settings
  • Start/end position defined by child GameObjects or offsets
  • IPressable integration to trigger movement

TriggerPush

Applies a continuous force to any Rigidbody that enters the trigger volume. Useful for wind zones, fans, jump pads.

PropertyDescription
ForceForce magnitude
DirectionPush direction (world-space)
AffectsPlayersWhether to push player controllers

TriggerTeleport

Teleports any entity that enters the trigger to a target transform. Supports:


IPressable pattern

CSHARP
public interface IPressable
{
    public class Event
    {
        public Component Source { get; init; } // The pressing component (e.g. PlayerController)
        public GameObject GameObject => Source?.GameObject;
    }

    bool CanPress( Event e ) { return true; }
    bool Press( Event e );
}

Implement IPressable on any component to make it interactable with the player's use key. The player's PlayerController calls CanPress then Press on the nearest valid IPressable in range.

Key points

Was this helpful?