Camera & Viewport - Getting corner vectors

Hi,

I’m trying to get the vector3 positions of the camera viewport corners (TopLeft, TopRight, BtmLeft & BtmRight). I have:

https://playground.babylonjs.com/#9310J2

But it’s far from correct, as it doesn’t take into account the camera’s rotation.

What is the size of the camera’s view as a vector on x & y?
How do you get the corner vector3’s A,B,C,D (see image) of the camera at any angle?

Thanks

DCameraViewport

I thinks its
https://doc.babylonjs.com/api/classes/babylon.frustum
:slight_smile:

If not then there are ways, but off the top of my head I think this does it.