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. A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums
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:
#include "Navigation/PathFollowingComponent.h"
#include "NaturalPathFollow.generated.h"
UCLASS()
class PUEBLOSIM_API UNaturalPathFollowComp : public UPathFollowingComponent
{
GENERATED_BODY()
public:
/** follow current path segment */
virtual void FollowPathSegment(float DeltaTime) override;
/** sets variables related to current move segment */
virtual void SetMoveSegment(int32 SegmentStartIndex) override;
/** check state of path following, update move segment if needed */
virtual void UpdatePathSegment() override;
};
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???