I’m looking for a way to get the the aspect ratio of the camera to drive a screen-wrapping macro. To make it easy on myself, I’ve set my FOV for 90, and my distance (camera pointing downward in Z) is 5000. this makes my on-screen objects the proper size for the game. This means I set my screen wrap distance in X to be 2500, and my Y distance to be 2500 * 1.77778, given a 1920x1080 viewport. My objects go offscreen on one side and reappear on the other just fine.
I’d like to make this a little, or a lot, more elegant. I’m a VFX refugee, so calculating apertures and such is no big deal, but what I’m trying to do is calculate the horizontal screen wrap distance from the aspect ratio, which is determined by the X and Y of the viewport.
Currently in the HUD I have a 2D Vector variable called VPXY that I want to set with the viewport’s x and y size, from which I can derive the aspect ratio. What I can’t figure out how to get to is the scene camera FOV and distance. How I do i get camera transform and FOV from within:
-The HUD Blueprint?
-An actor Blueprint?
Thanks in advance, and thanks for all the information I’ve gotten from other threads so far!