I recently came across the game turbo tunnel. I want to make a similar game.
only thing that stands in my way is the collision detection. I first thought of learning plane line collision detection. But I didn't understand that stuff as I am too small(11th grade). I know gluunproject that uses coordinates on screen to world coordinates.
Things I thought about collision detection: -
getting a physics library. (But I am not sure how do I use bullet).
using box collision. (This solution may not work for irregular shaped doors) .
third method is given below:-
1) render the whole scene by plane's view.(no lightning, no textures)
2) get the depth buffer at pixel at centre of screen.
3) use gluUnproject for getting realworld coordinates of centre pixel. Let's say this point M.
4) if the distance between plane and M is less than certain value then aeroplane blasts off.
5) clear buffer bits and re render the scene with textures and lightning.
The third method is my idea. I am not sure if it is good to render the scene 2 times. But since only one object requires collision detection it may be a choice for me.
I am asking is using 3rd method to check for collision is good idea? if not So I should think something other.