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

Is there a function to check if a part is visible to the player?

Asked by
P100D 590 Moderation Voter
8 years ago

I have already tried Camera:WorldToScreenPoint, but it still returns true if the part is, say, behind a wall. Is there a built-in function that can tell me if the player can see a part, or would I have to script one myself?

2
You can raycast parts to see if they are within the field of view. DeadToMe 105 — 8y
1
Using WorldToScreenPoint plus a few rawcasts is really the only good way to do this, since we don't have direct access to the renderer. adark 5487 — 8y

Answer this question