I am implementing dragging 3D object by mouse in my engine.
I have the following formulas:
1. I get length of the vector from camera to object
2. Calculate angles like FOV/width (for X axis) * mouseDelta.X
3. Find triangle side length like var x = Math.Tan(angleX)*distance;
4. multiply X *= frame time;
So, I receive the length in the 3D world space on which I must move the model.
Then I multiply my camera relative X and Y axis on those final values (X and Y) and add to the current position.
And it seems working for fps 300.
But when I set 60 fps, my gametime increases and object become moving much faster.
My goal is to make my dragging algorithm fps independent and move all objects with constant speed.
Does anyone know how to reach that?