Input causes Letterbox to Shift when Camera Aspect Ratio is Constrained

Recently I’ve decided that I’d like to test my game within a constrained Aspect Ratio of 16:9 since I don’t want my camera’s view to be modified whenever the application window is resized.

Screenshot 2023-11-17 at 8.11.54 PM

After ticking the Camera Property “Constrained Aspect Ratio” and testing in a new window I noticed that initially things seem fine, however when the fire input “Space Bar” is pressed, the letterbox shifts and the camera view with it. After a couple seconds everything returns to normal until the next time a projectile is fired. I’m not quite sure why this is the case, and was wondering if anyone else has run into this issue before?

I used EnhancedInput for my character movement and to trigger my fire sequence, but it only seems to affect my camera when the fire input is pressed. This is my C++ code.

This is a link to the video of the camera bug:

After coming back to this a couple weeks later, I’ve identified that the root of the issue was the call to DrawDebugSphere() in the Fire function. There seems to be an underlying bug that occurs whenever this function is called and the cameras aspect ratio is constrained. Removing the line that executes DrawDebugSphere() gets rid of the issue altogether.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.