Why aren't we getting only one way point waveConfig.GetWaypoints()[0]?

Hey all,
I feel a bit dumb but really cannot get why we are taking only the first entry of the List with the [0] index but we obtain the whole path.

As far as I got it the waypoints are the single points in space we got in a path.
If we get only the first one with the index 0, how it is that the enemy follows the whole path?

Oh my God maybe I actually got it:
this is just to set the initial position of the enemy!
Was a bit unclear from the video if it’s like that.
Can someone confirm?

Thank you!

1 Like

Hi FedFod,

Welcome to our community! :slight_smile:

You are right. We instantiate our enemy at the position of the first waypoint. That’s why we access the element at the hard-coded index 0.

See also:

Thank you Nina!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms