Archived

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

-Malcolm

Small bit of help needed

Recommended Posts

I am writing a small flight sim program. I have everything coded and I''m having a small problem. I don''t know if there is a function or a flag for this but is there a way to make all quads/triangle not able to be passed through? Like when they collide they don''t pass through each other? Any help would be appreciated, and if I''m not explaining this very well I can try to describe it better... Thanks, Malcolm

Share this post


Link to post
Share on other sites
anything specific like the actual function? I don't really like looking through the NeHe tutorials if possible. Basically what I want to do is make it so that my camera can't pass a selected path, and that’s about it.

Thanks again


Edited by - -Malcolm on December 9, 2001 10:11:41 PM

Share this post


Link to post
Share on other sites
*sigh* ok then, I''ll try to look down a different path then. If anyone else has any other solutions please post them up, again, any help would be appreciated.

Malcolm

Share this post


Link to post
Share on other sites
Grab the plane that the polygon lies on, cast a ray from the cameras position to where it will move to. If the two ends of the ray lie on different sides of the plane, then it''s POSSIBLE collision has occured. Now check the actual point of collision to see if it''s within the polygon. If it is, a collision HAS occured, else a collision has not occured.

-----------------------
0wn 0wn 0wn your goat
gently down the pw33n

Share this post


Link to post
Share on other sites