Sign in to follow this  
sirSolarius

Opcode and ray collisions

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this