jjzjj

c++ - OpenGL 相机 - 在使用 SetCursorPos(x,y) 时移动相机而不使其快速返回;?

我在尝试更新相机时遇到问题。我想通过鼠标改变相机的俯仰和偏航(它看起来的地方)但我希望鼠标保持在窗口的中心。//whereMouseP.x.yisthemouseposition//(whichiscenteredtothecurrentwindow)//getoldpositionofthemouseOldP.x=MouseP.x;OldP.y=MouseP.y;//workoutthedistancetraveledDelta.x=MouseP.x-OldP.x;Delta.y=MouseP.y-OldP.y;//updatethecamera(usingdistancetrave