Entity/SetModelScale

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Bug)
m (Bug also affects IK)
 
Line 12: Line 12:
 
{{Bug|Issue=2193|The hull does not scale properly with this function.}}
 
{{Bug|Issue=2193|The hull does not scale properly with this function.}}
  
{{Bug|Issue=3502|This does not scale procedural bones.}}
+
{{Bug|Issue=3502|This does not scale procedural bones and disables IK.}}
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=Yes
 
|IsClass=Yes

Latest revision as of 20:08, 24 June 2019

 Entity:SetModelScale( )

Contents

Description

Scales the model of the entity, if the entity is a Player or an NPC the hitboxes will be scaled as well.

For some entities, calling Entity:Activate after this will scale the collision bounds and PhysObj as well; be wary as there's no optimization being done internally and highly complex collision models might crash the server.

This is the same system used in TF2 for the Mann Vs Machine robots.

To resize the entity along any axis, use Entity:EnableMatrix instead.

If your old scales are wrong due to a recent update, use Entity:SetLegacyTransform as a quick fix.

BUG

The hull does not scale properly with this function.

Issue Tracker: #2193

BUG

This does not scale procedural bones and disables IK.

Issue Tracker: #3502

Arguments

number scale

A float to scale the model by. 0 will not draw anything. < 0 will draw the model inverted.

Arguments

number deltaTime=0

Transition time of the scale change, set to 0 to modify the scale right away.

Examples

Example

From the "Biggify" option of right clicking an npc

ent:SetModelScale( ent:GetModelScale() * 1.25, 1 )


Personal tools
Navigation