Mouse Position
Mouse Position
Is there a way to get the position of the mouse pointer (x,y) and then change it in code? Needed for 3rd person mouse control.
Cursor control:
http://irrlicht.sourceforge.net/docu/cl ... ntrol.html
http://irrlicht.sourceforge.net/docu/cl ... ntrol.html
An example?
I saw that before and I'm sure the answer is there but I'm too new to working with APIs to make much sense of it. Could someone give me an example?
Code: Select all
if (event.EventType == irr::EET_MOUSE_INPUT_EVENT)
{
s32 mouseX = event.MouseInput.X;
s32 mouseY = event.MouseInput.Y;
}
-
- Posts: 49
- Joined: Thu Aug 12, 2004 12:42 pm
- Location: Sweden
- Contact:
Code: Select all
irrlichtDevice->getCursorControl->setPosition(0.5f, 0.5f);
This monkey is useless, it only has ONE ass!!!
Didn't seem to work?
turboferret, it gave me an error messaage:
error C2227: left of '->setPosition' must point to class/struct/union
Any ideas? If I can get this working I'll write a tutorial about it to help other newbies.
error C2227: left of '->setPosition' must point to class/struct/union
Any ideas? If I can get this working I'll write a tutorial about it to help other newbies.