Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to detect if a part is in a player's view? [UNANSWERED]

Asked by 10 years ago

What would be the best method to determine if a part is fully in a player's view/camera? Such as a player looked at a door and it opened. Would it need to be a local script, or can you do such a thing server side too?

Much appreciated.

0
You could possibly use Raycasting, but I'm not sure about this. TheGuyWithAShortName 673 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

Er, you'd have to do some trigonometry to determine the sight range of a player, then if the part is in a certain angular area from the player. I have no idea how to put it into practise, though.

0
I know there used to be a guide somewhere on the topic, I think it was LuaLearners, but it shut down. Thanks anyways! chance9025 15 — 10y
Ad

Answer this question