Optimised projectile ray casting