I'm currently working on a system where I create a linear path by spawning waypoints, but i'm struggling to figure out how to compute the rotation needed to render the corner waypoints correctly.
if I rotate it towards (nextSegment.Coordinate - myCoordinate) it almost seems correct, most corners are behaving how I want.
but you can see the first 2 corners, and one near the end are incorrect.
if I rotate it towards (prevSegment.Coordinate - myCoordinate) it solves the rotation for the incorrect segments in the previous solution.
I know the coordinate of the next cell, and the previous cell and the cell i'm trying to rotate.
But then the other segments are incorrect. I cannot figure out the pattern on how to decide which segment to rotate towards. Any ideas?