Garry's Mod Wiki

render.Model

  render.Model( table settings, CSEnt ent = nil )

Description

Creates a new ClientsideModel, renders it at the specified pos/ang, and removes it. Can also be given an existing CSEnt to reuse instead.

This function is only meant to be used in a single render pass kind of scenario, if you need to render a model continuously, use a cached ClientsideModel and provide it as a second argument.
Using this with a map model (game.GetWorld():GetModel()) crashes the game.

Issue Tracker: 2688

Arguments

1 table settings
Requires:
  • string model - The model to draw
  • Vector pos - The position to draw the model at
  • Angle angle - The angles to draw the model at
2 CSEnt ent = nil
If provided, this entity will be reused instead of creating a new one with ClientsideModel. Note that the ent's model, position and angles will be changed, and Entity:SetNoDraw will be set to true.