Page 1 of 1

Mouse pos reported as 0, clicks work, irrlicht & DX8

Posted: Thu May 31, 2007 12:56 am
by Kim2
Hi guys,

Because I read that the eventreceiver is not functioning correctly in .NET at this time I am trying to use directInput for my mouse control but I am having some problems.

The mouse functions are executing and I can get the mouse button clicks but the movement of the cursor (which is stored in the struct variable mouse_state.Xl/Yl/Zl) does not change from 0.

I have uploaded my entire project, it is here:
http://www.kimgadecki.com/code/Newton Example.rar
I am just a beginner so it is quite small and simple. Someone with programming experience, especially in directx, could probably look at it briefly and say "you forgot to include this" or "this doesn't go there" (or whatever the problem is) quite easily.

I am starting to wonder if maybe the irrlicht camera implementation is interfering with the mouse cursor.

Also I would like to know if it is possible to use the irrlicht input functions at all using .NET

Thank you for your time

Posted: Thu May 31, 2007 4:39 am
by BlindSide
I havnt looked at it but if you are using FPS camera scene node it will bind the cursor to the center of the screen.

Posted: Thu May 31, 2007 5:59 am
by Kim2
Damn that might be it.

Is there any way around this or do I need to use my own camera class?

Posted: Thu May 31, 2007 6:14 am
by Kim2
I changed the camera from FPS to just camerascenenode and it still gives a position locked at 0. Guess it wasn't that.

Edit:

If someone could just tell me why the event receiver doesn't work in this code and how to fix it the problem would be solved because I could use the irrlicht mouse input.

The event receivers in the tutes work fine and I can compile the tutorials but I get errors when I try to imitate them in my program.

Posted: Fri Jun 01, 2007 3:32 pm
by Kim2
Also wondering, if I use the maya cam but I want to change it so it rotates without needing a button hold and is slower to rotate, how would I do this?

Edit:

Found it in ISceneManager.h and edited the values, now I just need to work out the freeform rotation without needing to click!