Accelerated: Collision Detection/Prediction library

Hello, :chimpanzee_amused:

★ Accelerated is a collision detection/prediction library.
★ You define shapes, their position, velocity and acceleration and the library will handle notifying you on collision events.
★ You can check when will the closest collision happen, and with which objects.
★ High speed collision are detected - there is no tunnelling problem.
★ lightweight, fast - can be used on mobile

Potential usage:
★ AI’s that react to environment. eg. dodging a projectile
★ Reduce client-server lag by pre-sending collision events
★ Lightweight collision detection: computations happens when you add/edit/remove objects/collision happens. (To differentiate: discrete collision systems that run eg 60 times per second/each frame)

Available at git, along with examples on how to use it.

Dev blog. of this project:

Here is a little demo where AI characters dodge volleyballs. For each character, the AI checks if the closest collision for that character is less than certain time, eg 1 second.
If it is, the character tries to move to dodge a ball.

8 Likes

Great , Really Cool. Thanks for sharing :smiley:

So using this lib can I know if a physical object (like a ball or arrow) will hit the target or not, before throwing (supposing i am having mass and initial velocity vector)? and get position where it will fall on the ground ?

1 Like

Seems nice, but is it faster than bullet sweep test?

2 Likes

Yes, eg. if you use sphere collision shape, you could do something like:

1 Like

Cool

Can it also detect for non linear motion ? My arrow is affected by gravity .

The comparisons I have made were against JBullet with single threaded mode, since this library is currently single threaded as well.

The left axis of the graph is execution time of tested library divided by total execution time.

At around 2500 spheres the FPS is around 30 for Accelerated. For JBullet around 1200 spheres for 30FPS.

3 Likes

Yes, you can set acceleration as well, eg:

arrow.acc(0, -Gravity_constant, 0);
1 Like

Great :grinning:
Thanks so much

1 Like

Wow, not bad :smiley:

1 Like