Type ClientsideModel
ClientsideModel
Methods
| drawModel() | Draws the model at the clientside model's position and angles. |
| getModelScale() | Returns the current model scale of the clientside model (as set by setModelScale()). |
| getRenderMatrix() | Returns the current rendering matrix for the given clientside model, if it has one. |
| getScaleVector() | Returns the current scaling vector applied to the clientside model. |
| remove() | Removes the clientside model. |
| setAng( ang ) | Sets the clientside model's angles for rendering. |
| setAnim( anim, cycle, rate ) | Animates the given clientside model. |
| setBodygroup( id, subID ) | Sets the given bodygroup. |
| setLOD( level ) | Sets the level of detail for the clientside model. |
| setMaterial( mat ) | Sets the material of the clientside model. |
| setModel( model ) | Sets the clientside model's model path. |
| setModelScale( scale, deltaTime ) | Sets the model scale of the given clientside model. |
| setPos( vec ) | Sets the clientside model's position for rendering. |
| setPoseParameter( key, value ) | Sets the pose parameter with the given key to the given value. |
| setRenderMatrix( renderMatrix ) | Sets the rendering matrix for the given clientside model. |
| setRenderMode( renderMode ) | Sets the render mode of the clientside model. |
| setScaleVector( scaleVec ) | Sets the scale vector of the given clientside model. |
| setSkin( skin ) | Sets the skin to use on the clientside model. |
| setSubMaterial( index, mat ) | Sets the sub-material at the given index on the clientside model. |
Methods
- ClientsideModel:drawModel()
-
Draws the model at the clientside model's position and angles. Allowed render contexts: 3D camera.
Environment:
Client - ClientsideModel:getModelScale()
-
Returns the current model scale of the clientside model (as set by setModelScale()).
Environment:
Client - ClientsideModel:getRenderMatrix()
-
Returns the current rendering matrix for the given clientside model, if it has one.
Environment:
Client - ClientsideModel:getScaleVector()
-
Returns the current scaling vector applied to the clientside model.
Environment:
Client - ClientsideModel:remove()
-
Removes the clientside model. Call this if you don't need it anymore. Attempting to use it again will fail.
Environment:
Client - ClientsideModel:setAng( ang )
-
Sets the clientside model's angles for rendering.
Environment:
ClientParameters:
-
ang: Angles in the current 3D world to render with.
-
- ClientsideModel:setAnim( anim, cycle, rate )
-
Animates the given clientside model.
Environment:
ClientParameters:
-
(number | nil) anim: Animation enum/sequence number, or nil to stop animating. -
(number?) cycle: (Optional) How far through the animation to start (between 0 and 1, default = 0). -
(number?) rate: (Optional) Playback rate for the animation (default = 1).
-
- ClientsideModel:setBodygroup( id, subID )
-
Sets the given bodygroup.
Environment:
ClientParameters:
-
id: Body group ID. -
subID: Sub ID to use.
-
- ClientsideModel:setLOD( level )
-
Sets the level of detail for the clientside model.
Environment:
ClientParameters:
-
level: A number between 0 and 8 for fixed quality (0 being highest quality), or -1 for automatic based on distance.
-
- ClientsideModel:setMaterial( mat )
-
Sets the material of the clientside model.
Environment:
ClientParameters:
-
mat: Material path to set.
-
- ClientsideModel:setModel( model )
-
Sets the clientside model's model path.
Environment:
ClientParameters:
-
model: Model path to use.
-
- ClientsideModel:setModelScale( scale, deltaTime )
-
Sets the model scale of the given clientside model.
Environment:
ClientParameters:
-
scale: The scale value. -
deltaTime: The time to take when scaling.
-
- ClientsideModel:setPos( vec )
-
Sets the clientside model's position for rendering.
Environment:
ClientParameters:
-
vec: Position in the current 3D world to render at.
-
- ClientsideModel:setPoseParameter( key, value )
-
Sets the pose parameter with the given key to the given value.
Environment:
ClientParameters:
-
(number | string) key: The pose parameter ID or name to set. -
(number) value: The value to set on the given pose parameter.
-
- ClientsideModel:setRenderMatrix( renderMatrix )
-
Sets the rendering matrix for the given clientside model.
Environment:
ClientParameters:
-
renderMatrix: The matrix to apply to this model when rendering, or nil to reset it.
-
- ClientsideModel:setRenderMode( renderMode )
-
Sets the render mode of the clientside model.
Environment:
ClientParameters:
-
renderMode: Rendering mode, from ents.RENDERMODE_*
-
- ClientsideModel:setScaleVector( scaleVec )
-
Sets the scale vector of the given clientside model.
Environment:
ClientParameters:
-
scaleVec: The vector scale to apply.
-
- ClientsideModel:setSkin( skin )
-
Sets the skin to use on the clientside model.
Environment:
ClientParameters:
-
skin: Skin index to use.
-
- ClientsideModel:setSubMaterial( index, mat )
-
Sets the sub-material at the given index on the clientside model.
Environment:
ClientParameters:
-
index: Sub-material index. -
mat: Material path.
-