Entity/SetModelScale

From Garry's Mod
Jump to: navigation, search
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.

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.

Arguments

number scale

A float to scale the model by

Arguments

number deltaTime

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