Please .. URGENT HELP on Direct3D!!!

Started by
1 comment, last by ghdhayta 14 years, 10 months ago
hello everyone .. I'm new with the whole 3D programming .. and my team and I are working on a project where we use head-tracking and finger-tracking (with wiimote - read jonny lee's work) in a 3D scene using Direct3D .. Our problem has nothing to do with the wiimote or head-tracking .. it's about the Direct3D programming itself .. we are having a problem with the mouse cursor .. we want it to be independent of the head-tracking movements but it keeps moving with it .. plus we want it to be 2D (close to the screen) but now it moves like the 3D plane with the 3D scene we put it into .. so .. is there a way to make the mouse moves independent of the whole scene like it doesn't be affected with the projection matrix of the program? .. we read something about (sprite), can we make a sprite for the mouse to make it move independently than the whole scene or there is a much simpler way?? and does that actually work???? Please HELP US .. we are dying here .. it's very important for us to do this and we will appreciate any help from anyone .. thanx a lot ..
Advertisement
Ummmmm - sounds like your not using the system GDI mouse cursor but trying to create your own cursor and place it on the screen?

I may be off track here, but you need to set your mouse cursor vertex buffer and vertex format of your render routine to Transformed instead of Position. The Transformed format ignores any of your 3D world transformations and renders directly to screen coordinates.

With the transformed format, the vertex buffer hold a Vector4 transformed_position (X,Y,Z,W) value which is the X and Y screen coordinates of the screen, Z is the screen depth (0 = front, 0.999999 = back) and W is not normally used and just set to one.
Quote:Original post by Monza
Ummmmm - sounds like your not using the system GDI mouse cursor but trying to create your own cursor and place it on the screen?


that's exactly what we are doing :)

we managed to make a sprite separated from the whole scene so now the mouse moves without being affected by the scene's movement ..

thank you for your fast reply :-)

This topic is closed to new replies.

Advertisement