Is there any possible way to know whether a part is within your line of sight? I have looked around in the Wiki, and I haven't found anything of the sort... So if there is any way to create a method that can detect objects within your sight (detect whether the player can see the object or not), that'd be nice to know! Thanks in advance!
✓ ANSWER ACCEPTED
How can I make a method that will check whether a certain part is within your sight?
1 answer
✓ Accepted answer
Try using raycasting. If you're in first-person, have rays cast off of the Player's head in the directions of their field of view. If the rays hit an object, like a part, then it means it is within your field of view. Make sure the rays cast in visible areas, and nowhere else. That's my way of solving this, but since I don't know much about the Raycasting API, you'll have to resort to the wiki for more information on how to do this.
This is the best way to do it in my opinion, but there are many other ways, and I encourage you to explore more before coming to a decision.
1 comment
1
I'll take a look into it, thank you ;)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
This idea reminds me of that slender game, it's pretty good imo. Why not shoot a pm to the creator?