Entity.PointAtEntity

From GMod Wiki

Revision as of 09:47, 9 July 2011 by Unrealomega (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax Entity:PointAtEntity( Entity ent )
Description:
Points the entity in the direction of the given entity.
Returns: nil
In Object: Entity
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.PointAtEntity]Entity.PointAtEntity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionMake an entity point at you.
Used onNewerServer.png
Code
function PointAtMe(ply)
	tr = ply:GetEyeTrace()
	if tr.Entity then tr.Entity:PointAtEntity(ply) end
end
concommand.Add("PointAtMe", PointAtMe)
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox