Wednesday, March 20, 2024
HomeSample Page

Sample Page Title


I’m presently utilizing A* pathfinding in a 3D grid of blocks to search out one of the simplest ways to journey from a begin place to an finish place. However, my enemies have one other skill: they’ll teleport to a block whether it is seen from the place they’re standing.

Since A* pathfinding is node primarily based, this ought to be easy. I can simply add all blocks seen from a block as connections to the node that represents it. However, I presently haven’t any environment friendly means of discovering all seen blocks from a selected block.

My present technique is to ship out quite a lot of raycasts in 1-degree increments, nonetheless, it is a little inefficient, and I fear that it may miss some blocks additional out.

This does not actually work for me, as this must be run for each block that’s thought-about for the pathfinding (which is rather a lot), so it must be fairly quick.

What’s one of the simplest ways to do that?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments