I am implementing dragging 3D objects by mouse using picking.
For now basic implementation is ready, but I faced with one issue.
I am dragging objects relative to the camera X and Y axis. If I look at the back of the object, everything ok, but when I look backward,
axis will invert and when I will move mouse to the left, object will move to the right and vice versa.
For now I move object the following way:
objectPosition += camera.ViewMatrix.Right * -moveDistance.X;
objectPosition += camera.ViewMatrix.Up* -moveDistance.Y;
How to make that object always move in the mouse direction independent from camera position or rotation?