Global Variables
The global namespace has a bunch of useful variables.
The global namespace has a bunch of useful variables.
Time
| Type | Name | Description |
|---|---|---|
float | g_flTime | Current time |
Camera
| Type | Name | Description |
|---|---|---|
float4x4 | g_matWorldToProjection | |
float4x4 | g_matProjectionToWorld | |
float4x4 | g_matWorldToView | |
float4x4 | g_matViewToProjection | |
float3 | g_vCameraPositionWs | Camera position in world space |
float3 | g_vCameraDirWs | Camera direction in world space |
float | g_flViewportMinZ | |
float | g_flViewportMaxZ | |
float2 | g_vViewportSize | |
float2 | g_vViewportOffset | |
float2 | g_vRenderTargetSize |
Referenced API
Canonical API pages mentioned in this guide.
Sandbox.Time
No summary available.
Sandbox.Time.Now
The time since the game startup.
Sandbox.AnimationSequence.Time
The elapsed time of the currently playing animation sequence (seconds)
Sandbox.AnimGraphDirectPlayback.Time
The elapsed time of the currently playing animation sequence (seconds)
Sandbox.Connection.Time
No summary available.
Sandbox.Curve.Frame.Time
The delta position on the time line (0-1)
Sandbox.Gradient.AlphaFrame.Time
No summary available.
Sandbox.Gradient.ColorFrame.Time
No summary available.