Entity/SetPos

From Garry's Mod
Revision as of 18:42, 10 July 2017 by JasonMan (Talk | contribs)
Jump to: navigation, search
 Entity:SetPos( )

Contents

Description

Moves the entity to the specified position.

NOTE

If the new position doesn't take effect right away, you can use Entity:SetupBones to force it to do so. This issue is especially common when trying to render the same entity twice or more in a single frame at different positions.

NOTE

Setting a player's position with this function only works serverside

WARNING

Entities with Entity:GetSolid of SOLID_BBOX will have their angles reset!

Arguments

Vector position

The position to move the entity to.

Examples

Example

Sets the player's position to (0, 0, 0)

Entity(1):SetPos( Vector(0, 0, 0) )

Output:

The player is now located at Vector(0, 0, 0)
Personal tools
Navigation