Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Collision Detection
03-01-2013, 06:08 AM,
#2
RE: Collision Detection
Hi Linksblackmask

VDrift is using bullet physics lib. So you can use any method for object queries offered by it. For more specific examples you can look into car ai code. The experimental ai(ai/ai_car_experimental.cpp) is using a ray to check whether there is a fixed obstacle in front of it. It is using the castRay function meant for the wheels, could be simplified by using bullets ray cast call directly(see castRay implementation).

If you don't require exact information or are concerned about ray cast performance, you can calculate the distance to the surrounding cars(their center of mass) along your forward vector. I think this code is there for braking calculation, but is disabled.
Reply


Messages In This Thread
Collision Detection - by Linksblackmask - 03-01-2013, 12:34 AM
RE: Collision Detection - by NaN - 03-01-2013, 06:08 AM
RE: Collision Detection - by Linksblackmask - 03-07-2013, 02:14 AM
RE: Collision Detection - by NaN - 03-08-2013, 03:07 AM
RE: Collision Detection - by Linksblackmask - 03-13-2013, 09:46 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)