Which Coordinate system in getRayFromScreenCoordinates

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
Silbermünze
Posts: 34
Joined: Thu Sep 15, 2005 12:27 pm
Location: Stuttgart, Germany

Which Coordinate system in getRayFromScreenCoordinates

Post by Silbermünze »

Hi everyone!

Just a short question:

Which coordinate system is the line specified in, which is returned by

Code: Select all

irr::scene::ISceneCollisionManager::getRayFromScreenCoordinates
Is it the camera space or world space?
The doc only says it starts at the camera position, but it would be interesting whether it is the camera postion in camera space (which obviously would be (0,0,0)) or the camera position in world space which would be something not (0,0,0) dependent on where you placed the camera.


Thanks in advance
Thoran
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

For a non-orthogonal camera, the ray start is camera->ViewArea.cameraPosition, which is the camera's absolute (world) position.

See the implementations of CSceneCollisionManager::getRayFromScreenCoordinates() and CCameraSceneNode::recalculateViewArea()
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Post Reply