Game Development Community

Opposite of dglPointToScreen

by Emanuel Greisen · in Torque Game Engine · 02/17/2004 (6:59 am) · 1 replies

Is there an oposite of this, that is, could a 2D point on the screen be translated to a 3D point in the sim.

That would make it possible to cast a ray from the cam to this point (extend it in length) to figure out what it "hits". In this way making a "software" pointer would be no problem.

About the author

Recent Threads


#1
02/17/2004 (7:18 am)
In guiTSControl.cc see GuiTSCtrl::unproject. This is used by the editors to implement mouse select.

This resource by David Myers might also be helpful.

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2173