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

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Kim2
Posts: 14
Joined: Thu May 31, 2007 12:40 am

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

Post 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
Last edited by Kim2 on Thu May 31, 2007 1:26 pm, edited 3 times in total.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post 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.
Kim2
Posts: 14
Joined: Thu May 31, 2007 12:40 am

Post by Kim2 »

Damn that might be it.

Is there any way around this or do I need to use my own camera class?
Kim2
Posts: 14
Joined: Thu May 31, 2007 12:40 am

Post 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.
Kim2
Posts: 14
Joined: Thu May 31, 2007 12:40 am

Post 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!
Post Reply