I work on a large open world game with a map size of around 10,000 x 10,000. In my game I have guns that can be aimed and to achieve a zooming effect I set the cameras field of view to a low number (8 - 33). The farther I get from the center of my map when aiming with my guns the more I notice the guns violently shake from any kind of camera movement (scripted movement or user input movement).
~850 studs from (0, 0, 0), very subtle shake:
~6400 studs from (0, 0, 0), very obvious shake;
Both videos were recorded in the same studio play test session. Stripping away all the movement effects boils the positioning logic for guns down to
gun.CFrame = camera.CFrame * hardOffset and the shaking still persists.
Camera shake repro.rbxl (20.9 KB)
The repro file below contains none of my games code but uses the same positioning logic from above. The easiest way to see the behavior is by doing the following:
- open the repro place and start a test with a player
- hold the right or left arrow key to rotate the camera
- observe the part aligned to the camera shaking
The repro place comes with the spawn location position at (0, 0, 1000). At 1000 the shaking is hard to see. Position the spawn location further away (0, 0, 6500) and test again to see the shaking be more obvious. For reasons I can’t figure out the shaking is far more noticeable in my game than in the repro place. The only code needed to run the repro is found in
I can repro this behavior 100% of the time in studio and in a published game. This has been an observable bug since my game launched in 2017. To the best of my knowledge it is not platform specific.
While this bug exists I cannot hope to have a good user experience with high-zooming firearms in my game. To the best of my knowledge there is nothing I can do as a developer to work around this issue. The bug existing within such a small radius around the origin severally limits my ability to make large games on Roblox.