How to get a Camera's frustum plane at a specific distance (if possible in BP)?

Trying to get the size/location of a camera frustum’s plane at a specific distance (depth) from the camera.

Is there some ready solution that would allow to do this without messing with projection matrices in C++?

I am not aware of a ready made function for this, but given the camera transform, field of view angle and aspect ratio it is relatively simple math to calculate what you need. The center of the plane is at CameraLocation + CameraRotation.Vector() * Depth, horizontal size is FMath::Tan(FOVInRadians * 0.5f) * Depth * 2.f and the vertical size is HorizontalSize * ScreenSize.Y / ScreenSize.X

6 Likes

Just gonna drop this here for anyone who’s been scratching their head at this. Unreal uses a fixed horizontal FOV so you need to do the maths using the vertical FOV. Here’s what my function looks like based off the above answer: