I multiply the mouse movement by a given number to get camera rotation of a desired speed. But it only works at 60 FPS. When I don't limit the frame rate I get around 350 FPS and the camera rotation is significantly too slow.
In my calculation, I already consider the frame time.
rotateCamera(ivec2 deltaMouse, float deltaTime, float sensitivity)
{
// apply multipliers
deltaMouse *= deltaTime;
deltaMouse *= sensitivity;
// rotate camera by deltaMouse
// ...
}
Is this approach wrong? Why isn't the mouse movement independent from the frame rate in my code? How to achieve that?