swift - Creating A Racing Line For an AI Path -


i creating top down racing game ( or trying! ) using spritekit. creating tracks procedurally catmullrom splines created points. have access 3 sets of points, inside of track, outside of track , centre line of track.

a representation of track showing current ai path line

i using gkagents, gkgoals, , gkbehaviours gameplaykit ai cars, , have few cars following gkpath. points have provided gkpath centre line shown in yellow in image.

my maths skills not that! question given know inner, outer , centre points, how can modify centre line points create more realistic racing line ai cars follow?

if need clearer idea of going on, can see central points in video: https://www.youtube.com/watch?v=yhwnl0icbuu


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -