Small bit of help needed
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
Look up collision detection.
---------------
I finally got it all together...
...and then forgot where I put it.
---------------
I finally got it all together...
...and then forgot where I put it.
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
Thanks again
Edited by - -Malcolm on December 9, 2001 10:11:41 PM
Collision detection is not part of OpenGL or any other graphics API. It''s too high level to be generalized.
[Resist Windows XP''s Invasive Production Activation Technology!]
[Resist Windows XP''s Invasive Production Activation Technology!]
*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
Malcolm
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
-----------------------
0wn 0wn 0wn your goat
gently down the pw33n
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement