Jump to content
  • Advertisement
Sign in to follow this  

Opcode and ray collisions

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

After struggling through the Opcode documentation (or lack thereof...) I'm still having some difficulties. I set up a mesh as a collision model, and I want to test a ray against it. The problem is that I don't want this ray to be position/direction, but rather a line segment with a fixed start and end point. I would like to cast this and then find the first intersection point (if it exists) with my mesh. I'm not sure how to do this, however, so any help would be appreciated.

Share this post


Link to post
Share on other sites
Advertisement
I don't know anything about opcode's interface, but can't you just convert your line segment endpoints to origin/direction form, and then reject parametric values outside of the segment range?

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!