Is there a way to get the bounds / frustum coordinates of a UE4 scenecap2d at a given focal distance?
I’m not seeing a way of getting either 6 vectors for the frustum volume coordinates or 4 vectors for a plane at a given distance from camera. There’s “Draw Debug Frustum” BP node, but when I plug the transform of a camera into it just draws a square at the camera position, not a frustum / truncated pyramid.
Also, in the “show” menu I’m able to turn on “camera frustums”, but I only see this in-editor, not during play. I have both scenecap2d’s and cameras in the level and “ShowFlag.CameraFrustums 1” has no effect on either of them.
Would greatly appreciate any help you can provide. Hopefully there’s something that can be done in BP, I’m hoping to hold off on cpp until I finish my prototype.
Using the “DrawFrustumComponent.cpp” as a reference I developed a set of methods for calculating frustum height and width, as well as calculating camera distance or field of view relative to a height / width;
Obs.: The editor uses a constant aspect ratio, so when tested on the editor, it is necessary to call methods with FixedAspectRatio as true, but at runtime, use it as false.