render.Model

From Garry's Mod
Jump to: navigation, search
 render.Model( )

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.

NOTE

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.

BUG

Using this with a map model (game.GetWorld():GetModel()) crashes the game.

Issue Tracker: #3307

Arguments

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

Arguments

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.
Personal tools
Navigation