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.
warden
Posts: 11 Joined: Thu Nov 24, 2005 3:54 pm
Post
by warden » Mon Feb 27, 2006 3:41 pm
Hi,
i want to check in what orientational relation a certain pixel is from a certain scene node and furthermore move the scene node to that position.
the scene node may be a child from the camera at x,y,z
my input coordinates are x=-1..0..1 and y=-1..0..1 on the screen. i could switch to pixels as well (i.e. 0..1280*0..1024).
how do i transform those input coordinates into the coordinate space of the scene node?? i currently have no clue how to do that.
could anyone of you guys plz help me out?
thanx a lot!
warden
vitek
Bug Slayer
Posts: 3919 Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR
Post
by vitek » Mon Feb 27, 2006 6:54 pm
If you have a 2d screen coordinate the best that you can do is get a 3d line that goes from the camera position through that screen position. Have a look at the getRayFromScreenCoordinates and getScreenCoordinatesFrom3DPosition methods of the ISceneCollisionManager interface.