Can someone explain how requestdirectmove() and movetoactor() are related and what movetoactor() actually does?
ok just rewatched videos. movetoactor gives data to requestdirectmove every frame so it knows what direction to move and requestdirectmove is what actually moves the tank. we also overrided the requestdirectmove so that it uses our movement component instead of the default one. its the complicated stuff thats easy to use that confuses me sometimes.
Basically MoveToActor will call a bunch of other functions in the AIController which in a nutshell finds the path and sets some data. Then in the MovementComponent will eventually call RequestDirectMove every tick.
This next part isn’t important to understand I just thought it would be nice addition.
Here is the function that eventually calls RequestDirectMove