Jump to content
  • Advertisement
Sign in to follow this  
extraneus

Windows event handler - camera looking around

This topic is 3815 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello! I am using the Window Proc to get mouse events because i have heard you should no longer use dinput because it is no longer supported etc. Now i wanted to use this mouse event handler for looking around with a camera. The problem is that if the mouse cursor gets to a border of the window naturally the camera won't move anymore... How could I handle this? Maybe i could set the cursor to the other side of the window but this would be very hackish... Thanks a lot!

Share this post


Link to post
Share on other sites
Advertisement
You can set the cursor position in DirectX just set it to the center after you get the movement. This way you program will still get the movement but wont know that the mouse was moved back to the center. Or better yet just store where the mouse was click at then keep moving it back there every update. Then once they release the mouse let it move where ever they move it.

Share this post


Link to post
Share on other sites
Thank you a lot! But how do i move the cursor to the center with directx? Would it not be better to just use dinput? Thanks!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!