There is hardly any documentation on how to handle the actual movement of a custom PathFollowComponent (applying the SetLocations/rotations/etc.). There is this tutorial by Rama but he doesn't tell you where to even get the Controller to apply the location and rotation functions for movement. https://wiki.unrealengine.com/AI_Navigation_in_C%2B%2B,_Customize_Path_Following_Every_Tick
I have a very simple barebones class for my own custom PathFollowingComponent because I want to be able to dictate where and how a character moves (speed/direction) along a certain path as it goes from path node to path node:
I already have an AIController class that uses this custom PathFollowingComponent and it is calling the 3 functions above successfuly. But I don't know where to go from here. The UE4 documentation does not offer examples and the raw source is not very helpful. How do I go about from here getting the current node position, next node position, and the object in which to apply velocity to traverse through the path???
asked Aug 22 '17 at 12:34 AM in C++ Programming
I was looking for a solution to one of my issues with using a customized UPathFollowingComponent (my functions don't fire at all from the AIController, but I digress), and came across this question that I think I may be able to answer.
So the functions I found particularly useful are:
You can combine these with functions in FNavPathSharedPtr (FNavigationPath) by feeding the Index you obtained from the above functions:
With this information and the Pawn's current velocity, etc, the AI Controller should be able to work out the appropriate inputs. If you'd like me to share my code, I'm more than happy to do so even though mine is embarassingly basic. ;)
answered Feb 07 '18 at 01:32 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here