Team Spartan Cookies & Milk Forums
Hologram as Entity ? - Printable Version

+- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk)
+-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html)
+--- Forum: Starfall (https://teamscm.co.uk/forum-7.html)
+--- Thread: Hologram as Entity ? (/thread-2062.html)



Hologram as Entity ? - 4N0NYM - 18-12-2016

does a Hologram count as a Entity and when not is it possible to make ? that for example
 if Player:aimEntity() == Hologram then 
work ?


RE: Hologram as Entity ? - Person8880 - 18-12-2016

Holograms are not solid, so that won't work. The aim entity is the closest solid object your cursor is pointing at.


RE: Hologram as Entity ? - 4N0NYM - 18-12-2016

So there is no way to detect when a Player is looking at the Holo ?


RE: Hologram as Entity ? - Kosmos - 27-12-2016

I'm not sure if Player:aimEntity() does some sort of caching, but you could always use trace.traceLine(), it allows you to detect non-solid objects. Another advantage is that you get the hit position, hit entity, hit normal, hit texture, etc. all in one call.