3

If the thickness of your line / the radius of the circle following it is substantially narrower than your grid spacing, then it suffices to take the circle traversing your line and approximate it as a bounding square. This bounding square has a leading corner (furthest ahead along its velocity vector) and a trailing corner (furthest behind). We can use the ...


1

This is a bit of a guess, but based on my experience with pooling: You have this line in your enemy health script: SpawnReference.ResartSpawner(); I'm guessing that EnemySpawnerEternal is some type of spawn-pool system. Perhaps calling RestartSpawner() returns all spawned objects to the pool?


1

Check if the cell in the direction of the largest component (in absolute value) is free. If so, move there. Done. Check if the cell in the direction of the smallest component (in absolute value) is free. If so, check if the diagonal cell that's the sum of the two previous offsets checked is also free. If so, move there. Done. If not, move to the tile in ...


1

Did I implement the various formulas correctly? No. A normal should be a single direction vector with one x value and one y value, not a line segment joining two points. Point projection where you divide by slope will behave badly for horizontal lines where the slope goes to zero. Your overlap test checks only one side of one polygon. How should I "...


Only top voted, non community-wiki answers of a minimum length are eligible