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.
How to project the window coordinate back to space
Re: How to project the window coordinate back to space
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: How to project the window coordinate back to space
if `getScreenCoordinatesFrom3DPosition` is not enough for you, here's everything you need to know:
https://www.khronos.org/opengl/wiki/Com ... ndow_space
https://www.khronos.org/opengl/wiki/Com ... ndow_space