PhysObj.GetPos

From GMod Wiki

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


Examples

DescriptionGets the position of the physical object player1 is looking at.
Used onNewerShared.png
Code
tr = player1.GetEyeTrace()
if (tr.HitNonWorld) then
ent1 = tr.Entity
phys1 = ent1:GetPhysicsObject()
pos = phys1:GetPos()
end
OutputVector of position in pos.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox