PhysObj.GetPos
From GMod Wiki
| Function | |
| Syntax | PhysObj.GetPos( ) |
| Description: | |
| Gets the position of a physical object. | |
| Returns: | Vector |
| In Object: | Physobj |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=PhysObj.GetPos]PhysObj.GetPos [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Gets the position of the physical object player1 is looking at. |
|---|---|
| Used on | |
| Code | tr = player1.GetEyeTrace() if (tr.HitNonWorld) then ent1 = tr.Entity phys1 = ent1:GetPhysicsObject() pos = phys1:GetPos() end |
| Output | Vector of position in pos. |