PhysObj.GetPos

From GMod Wiki

Revision as of 14:49, 13 September 2009 by UnrealomegaBot (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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