warning: Creating default object from empty value in /home/boristhebrave/personal.boristhebrave.com/modules/taxonomy/taxonomy.pages.inc on line 33.
This project is written in C++

Box2D Raycasts

Thu, 09/04/2008 - 22:50 — Boris

Box2D has always had a function called TestSegment for colliding segments with shapes, but it really needed conversion into proper raycasts. Check out a Demo.

I've implemented this in Flash and C++. It's the real deal: it uses Box2D's internal sweep and prune structure for efficient calculations. You should see the best performance gains on the previous naive solutions when doing very long diagonal casts, or when doing a long cast that hits something immediately.

Read more

Syndicate content