Finally got my bouncing code to work. At the moment the projectile can do a maximum of 5 bounces before it is destroyed. Next I will make it so that if it hits at a certain angle threshold it bounces, but if it is bellow the threshold it is destroyed. This is to create the a ricochet effect that can be used for bullets or arrows.