Jump to content
Posted 01 March 2013 - 06:29 PM
Posted 02 March 2013 - 12:38 AM
I would recommend reading about AI already supported by the Unreal engine: http://udn.epicgames.com/Three/AIOverview.html and the Waypoints technical guide: http://udn.epicgames.com/Three/WaypointsTechnicalGuide.html
I think the FindPathTowards:
This function will execute a traversal of the path network generating a
route from the AI's position to the passed goal, placing the generated
route (An ordered list of waypoints from the anchor to the goal) in the RouteCache of the controller. This will tell the AI what waypoints to move to in order to reach its goal.
would already potentially implement A*.
If this is not what you wanted you could still maybe use the waypoints/Navigation mesh system for your code.
While A* "should" be able to be used in a 3D game (as long as you can place the nodes correctly), it might be good to implement some Steering behaviors as well. This seems like it could be tricky in three dimensions..
Here is an example:
Edited by shadowisadog, 02 March 2013 - 12:40 AM.
Posted 02 March 2013 - 05:20 AM
shadowisadog, thank you very much for your reply! Steering behaviours like Seeking would be excellent, but I'm very unsure how to implement a library for a game, and given my tight deadline (19 days!) I would feel comfortable with a simpler, sure-thing approach.
On top of that, those links are related to Unity whereas I'm using Unreal, and I sadly can't afford the few days it'd take to fix anything that might go wrong. I'm aware of MoveTo and FindPathTowards, but the part I'm worried about is about node finding.
I could place some nodes in the game world for it to travel to, but what I'd rather do is get a variable that stores a randomly generated world coordinate and set that as the goal position, then create a new goal position to travel to whenever that is reached. I can see conditions I'd need to check for if I used that example (e.g. that coordinate is occupied by a static mesh), but is something like that possible?
Edited by Sammieo, 02 March 2013 - 06:03 AM.