How expensive is raycasting? I’m designing AI for fast-moving objects, and the environment is going to get chaotically dynamic (lots of obstacles to be avoided moving around everywhere). I want to have it predict the best next move frequently, but, to do it, it’ll have to do raycasts from all potential future positions. Since movement is 3-dimensional, this amounts to a lot of raycasts.
I know I can constrain them a bit by not having the raycast go beyond a certain range and by limiting how far ahead it needs to predict, but it’ll stil be alot of raycasts? How much overhead is that gonna be, generally speaking?