How does UE4 know the location of these points?

I follow the C++ as far as cycling through the indices goes, but in the code we only refer to PatrolPointsCPP to get its length. How does UE4 know what we mean by telling it to move to a certain index? Is this all happening behind the scenes and not supposed to be explicitly obvious, or am I missing something?

Thanks!

To answer the title question:

How does UE4 know the location of these points?

When you create a TArray and make it public you can then chose the points in the third person character BP in Unreal. Unreal using the engine can detect the location of the object and report it back to the behavior tree.

How does UE4 know what we mean by telling it to move to a certain index? Is this all happening behind the scenes and not supposed to be explicitly obvious, or am I missing something?

UE4 knows what to do because we coded it in. We decided what patrol points to move to. By creating index we created a way for the Behavior tree to choose between different patrol points. Everything is happening behind the scenes. It’s the power of UE4. The engine is getting the object’s information, i.e transform position, and using that to move to the next way point.

I hope this helps.

K-B

Privacy & Terms