Advertisement

Part 37: A functional player-placed beacon for directing AI

Part 37: A functional player-placed beacon for directing AI Some progress on that top-down little game I've been making. The placeable beacons now attract AI and send them off to appropriate destinations pointed to by the beacons.

To keep performance reasonable, I trace a path to one destination per tick when the beacon is placed, and store a unit direction vector corresponding to each destination. The array of direction vectors is checked whenever a friendly AI lands on a beacon to determine appropriate destinations. The use of paths to destinations rather than absolute directions to destinations (as the crow flies) means that the AI behave in more intuitive ways based on how the beacon or beacons are arranged (without the player explicitly having to specify any routes or directions).

I also briefly cover the behaviour tree (work in progress) again, and a few other little things.

UE4,unreal engine,fatmarrow,mapping,ground branch,level design,AI,AI perception,pathfinding,navmesh,navigation,beacon,

Post a Comment

0 Comments