简体   繁体   English

在 FPS 游戏中如何处理鼠标光标?

[英]How do you handle a mouse cursor in the FPS game?

I'm making an FPS game.我正在制作一个FPS游戏。 In the FPS game, the mouse cursor is in the middle of the screen.在 FPS 游戏中,鼠标光标位于屏幕中间。 So I put the mouse cursor in the center with the next code.所以我把鼠标光标放在中心,下一个代码。 But how can I solve this problem when the camera stutters very much every time I move the mouse?但是当我每次移动鼠标时相机都非常卡顿时,我该如何解决这个问题呢?

SetCursorPos(CRenderMgr::GetInst()->GetResolution().fWidth / 2, CRenderMgr::GetInst()->GetResolution().fHeight / 2);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM