Mouse event wont update camera rotation in winforms

前端 未结 1 1978
遇见更好的自我
遇见更好的自我 2021-01-15 21:21

My app has a custom panel used to display the XNA screen within a WinForm. I\'ve currently displayed a test model with no problem and now working on camera movement. My came

相关标签:
1条回答
  • 2021-01-15 21:38

    In order to use XNA's mouse API (rather than WinForm events) you must set Mouse.WindowHandle appropriately (MSDN).

    If you are using the official samples, then putting this in your MainForm's constructor will do the trick:

    Mouse.WindowHandle = this.Handle;
    

    (Of course using Microsoft.Xna.Framework.Input;)

    0 讨论(0)
提交回复
热议问题