Box2D flying arrows engine – first attempt

This is an uncommented and unoptimized attempt to make an arrow engine. I used the third example of my Flying arrows simulation with Box2D, added the lines to have the camera following the latest arrow fired taken from Develop a Flash game like Angry Birds using Box2D – Following bird with the camera and skinning crates and played with a custom contact listener to add different behaviors to arrow-wall collision, arrow-crate collision and arrow-arrow collision.

I got also inspired by iforce2D sticky projectiles, and this is what I made:

Click on the stage to shoot an arrow from x=50, y=240 according to the angle between such coordinate and mouse pointer.

This is the main class:

and this is the custom contact listener:

Next time, I’ll add some improvements like a real bow firing arrow at different speed. Meanwhile feel free to give feedback or suggestions.