Hey guys, is there a function to check whether the players eyeangles are looking at an entity's collision box? (ie. The entity itself).
Any advice?
ply:GetEyeTrace().Entity?
I can't get it to seem to work.
if LocalPlayer():GetEyeTrace().npcshop then draw.RoundedBox( 4, 150, 150, 150,150, Color(40,40,40,120)) end
This is within a hudpaint hook.
EDIT: Got it to work, nevermind. I thought you meant to put the entity you've declared in the spot you wrote 'entity', but then I put .entity == npcshop and it worked. Thanks.
[QUOTE=Dreken;40414884]I can't get it to seem to work.
if LocalPlayer():GetEyeTrace().npcshop then draw.RoundedBox( 4, 150, 150, 150,150, Color(40,40,40,120)) end
This is within a hudpaint hook.
EDIT: Got it to work, nevermind. I thought you meant to put the entity you've declared in the spot you wrote 'entity', but then I put .entity == npcshop and it worked. Thanks.[/QUOTE]
You are doing it wrong.
Post whole code.
Sorry, you need to Log In to post a reply to this thread.