- Home /
Question by
Md_Shariful_Islam · Nov 07, 2018 at 06:00 PM ·
arraypathfollowing
How can I make an NPC follow a path specified by an array?
I have a Vector2 array named path, where for each element the first number is the value on the x-axis and the second number is the value on the z-axis of a certain point in space. The value on the y-axis needs to be decided by gravity.
By being in the positions serially from path[0] to path[n], the NPC(a car) can follow the specified path.
How can I make the NPC (a car) follow the path specified by the given path array so that the car not only follows the specified path, but also rotates accordingly when it needs to make a turn?
Comment