Original Post
Hi!
I''m creating a racing game and I don''t know how to fix this problem.
Right now I send a ray from the center of the car to se if it hits any wall, this method stinks.
First of all I don''t want it in the center I want it to be on the edge of the car and second I don''t want to send a ray I want to check the entire front/side/back of the car, for example now if I hit a small object (thinner than the car) I can pass right trough it if is just a bit off the center of the car.
I would like to send a ray that is as thick as I want to see if anything is in that area.
the only thing I can come up with is to take the three coords of every face and devide the length between them into suitible chunks and send for example a ray from every 5 points, but that sound like it can get slow. Around the car I could send hundreds of rays or so, say I have 20 cars, 2000 - 5000 (or something) intersections every frame isn''t it possible that it might get a bit slow? in this case I also need to use the index buffer? so I don''t check the coords more than once.
well any ideas of how this should be done?
thanks!