Is there any reason that this code would not work as expect, i get values in vector that make no sense. I've tried a bunch of permutations and different casts.
PS - the values in the event are reasonable, not a case of them being undefined or some such.
Depends on what you are trying to get. If you want the mouse position subtract (400, 300) and then casted to a float, then that is what you're going to get. Most likely that is not what you want. Maybe you want the mouse position as a fraction of the screen size or something like that?
I'm simply looking for the position of the mouse around an origin of the center of the screen.
i've trouble shot this more and it seems like there is only an issue when i try to assign these values to members of a struct, defined in the class i'm working in...
Still confused but this seems to suggest this is more a general c++ error then an error in my use of Irrlitch.
I'm simply looking for the position of the mouse around an origin of the center of the screen.
Your code work fine for me if screen size is 800 x 600. Check if event.MouseInput.X and Y are returning correct walues. Also in case you don't know, origin of screen is in upper left corner of your monitor.