Jump to content
  • Advertisement

Archived

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

Astroguru

Object Selection in 3D

This topic is 5203 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!