I am working on a script to determine if an object is in a camera’s FOV. The camera is created using the Camera class and the object is added to the scene. However, I am facing a few issues:-
- Unable to access the viewport on the Camera object created since a render product can’t be attached to the camera.
- Furthermore, I am unable to compute the image coordinates of the object (I have access to the world coordinates of the object and camera intrinsic).
- Is there a viewport method which can be leveraged to check if a prim is visible or not? Or is there a way to access the camera frustum to check if the prim lies within the frustum?
Any help in this matter would be appreciated.