Panel:RebuildSpawnIconEx
Description
Re-renders a spawn icon with customized cam data.
PositionSpawnIcon can be used to easily calculate the necessary camera parameters.
This function does not accept the standard CamData structure.
Arguments
1 table data
A table containing the information needed to re-render the icon:
- Vector cam_pos - The relative camera position the model is viewed from.
- Angle cam_ang - The camera angle the model is viewed from.
- number cam_fov - The camera's field of view (FOV).
- Entity ent - The entity object of the model.
Optional keys:
- table lightbox - (As of 2026.08.26) Sets the "lightbox" for the model render. Wants 6 vectors (start index = 1). See render.SetModelLighting.
- table lights - (As of 2026.08.26) Sets the "dynamic lights" for the model render. Same format as render.SetLocalModelLights.
See the example below for how to retrieve these values.
Example
The RenderIcon method used by IconEditor. SpawnIcon is a SpawnIcon and ModelPanel is a DAdjustableModelPanel.
Garry's Mod
Rust
Steamworks
Wiki Help