The problem: currently it's possible to adjust the
range of view bobbing by changing the viewbob playerpawn field or the movebob CVAR. However, like I said, it only controls the range, i.e. how far the camera moves up and down. What it doesn't change is the speed at which the camera covers that range, because the speed is static. As a result, at lower viewbob/movebob values the camera is still bobbing like crazy, just over a smaller range (which, I'd argue, is generally not particularly useful on its own and can even be a tad nauseating deneding on the values).
This makes it impossible to properly design a camera movement for, for example, a heavy, slow-moving character. A heavy-slow moving chracter's view would have to bob up and down pretty far (large range), BUT do it slowly (because they're moving slowly and making fewer "steps"). This is a fairly basic idea that can be observed in many games nowadays.
At the moment, implementing this requires overriding the whole CalcHeight() function just to change this specific line:
https://github.com/ZDoom/gzdoom/blob/ma ... er.zs#L607
Code: Select all
angle = Level.maptime / (20 * TICRATE / 35.) * 360.;
What we need is a simple ability to inject our own number instead of that 20. E.g. if my character is a slow giant, I'd want it at 40 or 50, this gives me the same camera range but the camera takes longer to cover it. So, I propose a property to be added to the PlayerPawn class to make it more accessible, with 20 being the default value.