Jump to content
  • Advertisement
Sign in to follow this  
MARS_999

Pick Ray and objects

This topic is 2802 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

What are some ideas on dealing with objects that could be in front of the object you wanted to click on, when using a pick ray? e.g. a terrain hill is in front but the object is behind it. I guess with culling that could be solved but don't think its going to solve objects that are in a row and all visible....

Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Edit: Ok, re-read.

The solution is simple; have the ray ignore certain things and only register a hit against the first 'valid' object it encounters.

You might want to put a distance cap on it just in case.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!