conversion from 2d cord. to 3d and vice versa
conversion from 2d cord. to 3d and vice versa
How can we convert a 2d coordinate say mouse pointer coordinates to 3d world coordinates and from world coord to mouse cursor cord.
Have a look at the API, in particular at the ISceneCollisionManager.
This class (for which a pointer can be received via the ISceneManager)
provides all methods you need for this tasks.
For example, you can use getScreenCoordinatesFrom3DPosition() to
transform 3d coordinats into 2d screen coordinates.
This class (for which a pointer can be received via the ISceneManager)
provides all methods you need for this tasks.
For example, you can use getScreenCoordinatesFrom3DPosition() to
transform 3d coordinats into 2d screen coordinates.
It has long been an axiom of mine that the little things are
infinitely the most important.
-- Sir Arthur Conan Doyle, "A Case of Identity"
infinitely the most important.
-- Sir Arthur Conan Doyle, "A Case of Identity"
-
- Posts: 29
- Joined: Wed Oct 12, 2005 9:09 am
for 2d to 3d, look at the mouse picking section in the wiki-
http://www.irrforge.org/index.php/Mouse_Input
you don't need to use collision, you could just pick a set distance along the ray given by getRayFromScreenCoordinates
http://www.irrforge.org/index.php/Mouse_Input
you don't need to use collision, you could just pick a set distance along the ray given by getRayFromScreenCoordinates