Hi.
I have a 3D environment in which I can move around using the keyboard. Which function should I use if I want mouse movement instead??
<Edited By Moderator (Electroman), Altered Title>
Printable View
Hi.
I have a 3D environment in which I can move around using the keyboard. Which function should I use if I want mouse movement instead??
<Edited By Moderator (Electroman), Altered Title>
A good start if you are unfamiliar with the way the mouse works in DX is too look at the sample in the SDK.,..it helped me a lot the first time.Quote:
Originally posted by CyberCarsten
Hi.
I have a 3D environment in which I can move around using the keyboard. Which function should I use if I want mouse movement instead??
Is your problems by setting it up, or the movement it self?
No, I just don't know which function to use ;)
I'm guessing you weren't using DirtectInput for the keyboard? Well for the mouse I'd recommend using DirectX cos I don't think there is similar functions for the mouse :unsure:. I was thinking this the other day cos I was sure I have done it before but I couldn't remember the APIs :rolleyes: :D.
Yes, I know that I must use DirectInput since the WinAPI only supports x,y movement. But I dont know how to get started...
Have you looked at the samples in the SDK. I am not sure if I can explain it better then those samples...but I can try if you don't get them....they are very self explicable....
Are you using VB or C++? I'll try and dig out a project and show you the Input part from it ;).
I think it is C++...thats at least what I have seen he has been using the last year or so...
you are right again ;) it is c++
I will have a look at those samples, and hopefully the will ******** things
Sorry its taken me a while to get back to this but I eventually got sometime today and when i looked I haven't actually got an example for mouse input, just Keyboard.....strange cos I sear I saw it somewhere. I remember a while back making a thread asking if anyone had used Dx9 DInput for a mouse and Note replied :confused:.
Its ok, I'll figure it out somehow :)
If you want code for init a mouse with direct input, and a routine to use it...I can post one...
that would be great
BTW which version of Dx would it be? As for C++ I've only used Dx9 but I've used previous Dx version in VB, converting the keyboard code I used in VB & Dx7 to C++ & Dx9 wasn't too hard ;).
I use DX9