Entity.GetPos

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:GetPos( )
Description:
Returns the position of the entity as a vector.
Returns: Vector
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.GetPos]Entity.GetPos [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionReturns the entity to the players aim vector.
Used onNewerShared.png
Code
 
local StarMaterial=Material( "VGUI/star" )
function ENT:Draw( bDontDrawModel )
     local Vector1 = self:GetPos()
     render.SetMaterial( StarMaterial )
     render.DrawSprite( Vector1, 10, 10, Color(255, 255, 255, 255) )
end
 
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox