How to keep updates at a fixed rate?

Hi! I’m currently working a FPS as a project to learn Unity. I’ve been editing values to make the amount that the gun moves up/down and left/right whenever the player moves. The problem is, is that in the editor the speed is perfect, but when I build the game it’s extremely fast and looks dumb. I know this is caused by the framerate (or I’m assuming it is). So I looked into Time.deltaTime and Time.timeScale as a multiplier for every value that I update each frame but this didn’t really work. So how can I make the speed of the game constant so now matter what quality the game is, it will never be extremely fast?

Hi,

You have to multiply the values you are using for camera movement with Time.deltaTime.

It works ok in Unity editor becuase editor has it’s own frame limiter.

Ok, that’s what I thought I had to do. I got the speed thing fixed for the most part now but there is a new problem. In the editor the gun is low and pointing upwards a bit and looks great, but in the built version if I use fastest graphics the gun is much higher (but still in the screen). And if I use fantastic graphics the gun is still a bit higher but not as high as the fastest version. So basically the different quality selections are changing the height of my model… what could be the cause of this? Thanks again!