I’ve been sifting through for hours now, I’m trying to write basic vehicle AI for movement. All it has to do is apply input, which is relatively easy to long as it knows where it’s target destination is.
I have so far been able to get the AI to ‘Plot’ a path just using Get Path To Location, which is fine. The problem is, how do I then tell the movement component that ‘this’ is the next Path node to go to? Currently I’m doing this in Blueprint, which makes the actor go to the first pathpoint, but then how do I tell it to go to the next one? Do I literally have to manually tell it to go to this point, then this one etc? Additionally, how does that work when it’s pathing to an Actor, and the path updates?
‘Move To Location’ is a blueprint function I wrote, that works out what Input to apply to the vehicle based on the location it’s given and it’s current velocities etc.
I want to program my VehicleMovementComponent so that it works with the default engine AI Tasks, but I can’t figure out where CharacterMovementComponent actually works out what it’s supposed to do with ‘MoveTo’. In CharacterMovementComponent and NavMovementComponent, I can see ‘RequestDirectMove’ - which is the ONLY reference to AI movement I can find, but i can’t find where it’s being called from, or why on earth it takes in a Velocity instead of a location. …
virtual void UNavMovementComponent::RequestDirectMove(const FVector& MoveVelocity, bool bForceMaxSpeed);
Documentation is next to zero on this (everybodies making games with characters… bleh), so how do I make this work?