문제

Hey, I am making an AI on ROBLOX and I can't seem to figure out where to start for path finding, the most common AI feature. Can anyone help?

P.S. I don't know any raycasting, so I can't use that as my option.

도움이 되었습니까?

해결책

As already suggested, you'll want to take a look at the A* algorithm. It's the workhouse of pathfinding. If you don't think you can do that, try something simpler. There are many techniques out there, including breadcrumb trails for pursuing AI characters, for example. You could even apply a barebones (1,0,0) vector for moving right, (-1,0,0) vector for moving left, and so on at specific intervals while your game is running. Just get something working first. In any case, you'll probably encounter graphs at one point or another while adding pathfinding, so read up on the subject.

다른 팁

Look up the "A*" algorithm.

Does the A* Algorithm really help? Go here for a lesson on Pathfinding AI: http://lessons.lualearners.org/lesson?id=77

Roblox have released a PathfindingService which makes pathfinding quite easy :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top