Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About b2soft

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yep, it's an option (DirectInput, XInput, something else), but I want to keep things simple for my sample, at least, for now,
  2. actually, you can... own custom eventz for all! just kidding. Seems that checking for center-positioned mouse is OK for me Thanks, mates
  3. No, code is OK. Bug is that the second message contains - delta, since MOUSEMOVE is caused after SetCursorPos(cetner), it moves cursor back, -delta)
  4. Thanks for your code. Might help me!
  5. in such case I need to manage focus states of the window
  6. In case there are not only mouse-look camera, that can be a problem. Or to switch capture modes? I thought there is some way to not to send a MOUSEMOVE event after SetCursorPos is called
  7. I have a problem with implementing mouse-look camera movement, like in FPS games. For me common solution is: Process WM_MOUSEMOVE event in WndProc Calculate delta movement from the window's center using event's lParam Rotate camera Return cursor back to window's center using SetCursorPos The problem is when SetCursorPos is called, another WM_MOUSEMOVE event is being fired. So camera rotates back. What is the common way to create such type of camera on Windows platform (using WinAPI)? I know that in WM_MOSEMOVE I can check is mouse.x == windowCenter.x and if it is - do nothing, but it's a hack from my point of view. Is there any "non-hacky" way to achieve the goal?
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!