Help with "simple" math

So, I’m not the smartest person to exist, and I need some help with some math.
I have this simple math function here FPSMultiplier = FPS / 120 that takes the FPS and divides it by 120.
An FPS of 240 returns 2 and an FPS of 60 returns 0.5, as you would expect.
But this isn’t what I need.

Ive bound some camera movement to framerate, and having a higher framerate causes the camera to move more, and lower framerate causes it to move less.

So I though of implementing this multiplier to the math in the camera, as a way to fix the movement.
Using DeltaTime makes the camera very jittery, by the way, so I don’t want to use it.

I also have made the camera movement to work as intended with 120 fps on accident, too, which is why I’m dividing by 120 and not 60.

What I need is pretty much the opposite of what the current math does.
I need 240 FPS to return 0.5 and 60 FPS to return 2.

Any and all help is greatly appreciated, thanks.
The answer is probably really obvious, but I’m too dumb to understand it.

Videos:
60FPS


120FPS

Over 360FPS

You probably are doing something wrong that’s why it’s jittery.

Example of a camera shake which uses DeltaTime:

1 Like

Might be another math problem, or a side effect of how it’s implemented. No matter though, if you don’t need it then you don’t need it.

You need the reciprocal of your previous math function:
120/FPS

1 Like

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