Getting mouse pointer coords

Jdog

28-06-2009 20:04:33

Hi everyone, I'm new to myGUI (and ogre as well) so please excuse this question being really basic.

Basically I'm doing a top-down game which needs both mouse (look) and keyboard (move) to play. I did a small demo using CEgui before, and now I'm building the proper thing and was told that myGUI was far better.

I need to get the mouse coordinates so that I can place a sight node (for the character orientation) in the world. How do I get mouse coords accurately?

Also, I probably need to get this done in the FrameStarted method - the old demo made use of mouseMoved, but this is not good because (logically) if the character runs around without the player moving the mouse, the sight node remains where it is and this is an undesirable effect!

andrewfenn

01-07-2009 18:31:32

You get the mouse coords the same way you get them in CEGUI, using OIS.