Getting mouse position

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
nalin18
Posts: 3
Joined: Wed Jan 14, 2015 6:37 pm

Getting mouse position

Post by nalin18 »

Well I am using getMousePos() to find the mouse coordinates:

irr::core::vector2di mouse_pos = GUIEngine::EventHandler::get()->getMousePos();

But no matter the case, I am always getting mouse_pos.X and mouse_pos.Y always zero.

Can someone correct my mistake or I am doing it the wrong way.?

Thank You
Nalin
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Getting mouse position

Post by CuteAlien »

GUIEngine::EventHandler::get()->getMousePos() is not an Irrlicht function. Unless you show us the code of those functions we can't help you as we simply don't know what they do.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply