How to project the window coordinate back to space

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
Burton
Posts: 5
Joined: Fri Aug 03, 2018 12:08 am

How to project the window coordinate back to space

Post by Burton »

Hi everyone,

I need to implement a function that dragging a selected object and move it follow the mouse movement. In other words, I just need to implement the move function similar to 3Ds max. Select one axis, then you can move the object along the axis. I can get the viewing matrix V, projection matrix P. But somehow the point in space X is not just projected to the window by PVX. Any clues which part I missed up? Thanks.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: How to project the window coordinate back to space

Post by CuteAlien »

ISceneCollisionManager::getScreenCoordinatesFrom3DPosition might be what you are looking for. You get the ISceneCollisionManager from the SceneManager.
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
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: How to project the window coordinate back to space

Post by devsh »

if `getScreenCoordinatesFrom3DPosition` is not enough for you, here's everything you need to know:
https://www.khronos.org/opengl/wiki/Com ... ndow_space
Post Reply