Garry's Mod Wiki

Revision Difference

Entity:BeingLookedAtByLocalPlayer#515746

<function name="BeingLookedAtByLocalPlayer" parent="Entity" type="classfunc">⤶ <description>Returns true if the entity is being looked at by the local player and is within 256 units of distance.</description>⤶ <realm>Client</realm>⤶ <rets>⤶ <ret name="" type="boolean">Is the entity being looked at by the local player and within 256 units.</ret>⤶ </rets>⤶ </function>⤶ ⤶ <note>This function is only available in entities that are based off of sandbox's base_gmodentity</note>⤶ <note>This function uses Distance instead of DistToSqr so it may not be suitable in situations where it's called often</note>