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

How can you tell if a position can be seen by the camera?

Asked by 8 years ago

The title really explains it all. I want to see if a position is in the view of the camera. (Please take FOV into account)

1 answer

Log in to vote
2
Answered by
Unclear 1776 Moderation Voter
8 years ago

Use WorldToScreenPoint.

Description: Takes a 3D world point and returns the following: A Vector3 where the X/Y components map the position in screen coordinates the worldPoint maps to, and the Z component maps how far away from the screen plane the 3d position is (positive if in front of camera, negative if behind). A boolean which is true if the point is visible on the screen or not.

The last part is what you're looking for.

0
That was way easier than I expected, thanks! YellowoTide 1992 — 8y
0
ermahlogie. Nickoakz 231 — 8y
Ad

Answer this question