开发者

Making an AI - How to make path finding?

Hey, I am making an AI on ROBLOX and I can't seem to figure out where t开发者_如何转开发o 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜