简体   繁体   中英

How can I set cursor position with OpenTK?

I am working on an FPS Camera with the latest version of OpenTK (2.0.0.0) and I want to use mouse delta movement to control the pitch/yaw of the camera. For that I need to reposition the cursor to the center of the window but I cannot find a way to set the cursor position. I looked under GameWindow.Mouse and GameWindow.Cursor and I only found a way to get the cursor position, not set it.

How do I set the cursor position ?

您可以使用OpenTK.Input.Mouse设置鼠标位置:

OpenTK.Input.Mouse.SetPosition(x, y);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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