codeAPI Reference
s&box ICameraSetup: Camera render hooks
Interface for camera setup hooks that allow fine-grained control over camera effects. Implement to modify the camera at specific stages of the render pipeline.
Methods
CSHARP
public interface ICameraSetup : ISceneEvent<ICameraSetup>
{
/// Effects before viewmodel is rendered.
void PreSetup( CameraComponent cc ) { }
/// Place viewmodel at this stage.
void Setup( CameraComponent cc ) { }
/// Effects including viewmodel (screenshake, noise, etc.).
void PostSetup( CameraComponent cc ) { }
}Usage
Implement on components that need to modify the camera during rendering. The CameraSetup component calls these methods in order during PreRender.
- PreSetup: Apply effects before the viewmodel (e.g., camera noise updates)
- Setup: Place the viewmodel
- PostSetup: Apply effects that should include the viewmodel (e.g., screenshake)
Source
Used by EnvironmentShake, CameraNoiseSystem, and camera effects.
Was this helpful?