Archived

This topic is now archived and is closed to further replies.

Astroguru

Object Selection in 3D

Recommended Posts

Hi. I was quiet enthusiastically reading the chapter of redbook on selection, hoping to find a solution to my object picking problem for my project. To my disappointment, it didn''t give a method to distinguish between objects at different depths, but which lie at the same cursor position. So once again, seeking the help of real opengl people over here. I simply want to select that object which lies at the frontmost. I have enabled depth buffering. Thanks.

Share this post


Link to post
Share on other sites
the selection render returns a list of hits. these are a selection name and a z value. use the z value to determine which is closest - if you want the frontmost object discard all except the name with the lowest z.

Share this post


Link to post
Share on other sites