I need help with after I spawn an object that it finds a set of way points I have in my level and then it will move to those way points. This isn’t for an enemy AI it is for some moving debris down a tunnel that I am having the player jump on to get to certain parts of my level.
Thanks for the help.
You can manually use the node find path to location asynchronously, and get the vector3 points of that path generated from the node. Since a path is an array of vector3 points, in your logic you’ll need to make it so it first moves to index 0 of that array, then index 1, index 2, etc upon getting close enough to that point to mark it as “reached.” That’s using the UE4 navmesh.
If you want to generate points not using UE4’s navmesh, look into tutorials and information about Breadth-First Search (Useful if you want to find shortest path from a series of points you already have), Dijkstra’s Algorithm, and possibly A*. In that order/complexity. An excellent blog on pathing and the like can be found at http://www.redblobgames.com
Keep in mind while algorithms might be used commonly for specific things like AI navigation, they usually work and apply well to other features.
And if you don’t really care about automating it using the above algorithms, and would be fine with manually setting it up, just make an editable array that can hold your waypoint actors, and have it so the object will move to each entry’s waypoint location in the array after clearing the last waypoint like I previously mentioned. You can then just use the eyedropper tool to fill the array with your waypoints in the correct order in the level editor. I’d probably recommend that as the first step in testing anyways before moving on.
Thank you Deathstick I will give that a try.