Alright, so I’m making a vehicle AI based on the work Peter L Newton has done ([UPDATED 5/16] A.I. Templates - Bot, Car, & +Flying AI - Community Content, Tools and Tutorials - Unreal Engine Forums .)
Basically the AI takes it’s current position (vector) and compares that to a target (also, vector) In his example he shows a car driving to set points. Cool, but not exactly exciting.
I’m trying to shy away from my primitive by comparison AI system (that currently works) which uses things like overlap boxes to detect when something needs to be avoided, and I like the way this works (blackboards, not blueprints)
Only downside is; it still requires a vector. Which still requires the same clunky overlap boxes (Which randomly stop working after a minute or so, thanks EG)
Now this guy has figured it out! ZomBPir8Ninja: Basic MoveTo Behavior For Vehicles In Unreal Engine 4 the answer is the in FindPathToActor(or location)synchronously!
Except it doesnt work for me. Only way I can get something even remotely close to usable is to use the last index as an integer, and then I get the same result as putting 1 in the get throttle input. (since just uses the last entry being my player as the vector)
Now I’m not jumping on here, and running for help without trying anything else. I’ve tried basic math to get it to work better. Ie, get ai location, compare that to the vector in index 1, if they equal out (with some padding) sets a value to true, and the index goes up 1. Should work, but just results in the ai car moving very slowly, and stops working entirely if the path needs to be recalculated.
Epic is totally useless since I’ve tried to find forum posts, streams, documentation everything on what should work in the return value (nav path object reference)
The only thing that seemed to fit the bill was Add Local Navigation Grid for Points, it’s got a spot for the array, a place to set the height (height of array I’m assuming?) and a return integer to get just one vector. I assumed this would lay out a grid, and go through points one by one. It just wants to crash everything as unreal goes down to 1 fpm (minute) and then I get an error (exBlueprint Runtime Error: “Attempted to access index 13 from array PathPoints of length 10!”. Blueprint: AI_pawn Function: Update Movement Graph: UpdateMovement Node: Set Throttle Input
)
So my question, what in the ever loving ■■■■ goes in the return pin on the find path to actor node?