Entity.PointAtEntity

From GMod Wiki

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