I want to have a gameplay mechanic where if the player falls out of the camera view, they lose. I used WasRecentlyRendered but that doesn’t as expected on packaged builds…
So I’m wondering how do I get the camera bounds at a certain depth, so I can add a trigger box there and handle it using collision?
You can simply create an FConvexVolume and then use IntersectPoint or Sphere, or what not.
FConvexVolume myViewFrustum;
GetViewFrustum(myViewFrustum, /*Grab your Camera's ViewProjectionMatrix*/ myCameraVPM, /*If you want to use the near plane or not, probably not*/ false);
if (!myViewFrustum.IntersectPoint(myCharacterPosition))
{
// Not in view, do any losing logic.
}