I would like to help, but what raycasting mode are you reffering to? Some API? Also what kind of game is it?