Hi everybody,
I’m currently working on a bullet hell game and I’m stuck on getting the enemies to move in predetermined paths. Not just straight paths, but pretty much any kind of path you can draw on a piece of paper. For example, right now I’m trying to make the enemies move along a curved path that kind of looks like a logistic graph.
So far, I’ve tried using coroutines to divide the path into different parts (move straight 1s, curve 1s, straight 1.5s, etc.) but it seems inelegant and doesn’t work very well (the enemies end up at slightly different positions).
I’ve looked around a little bit and I’ve found things relating to Bezier curves, which I don’t know, and waypoints, but the examples I found were only for straight lines, unless you make a lot of them so that it seems curved. Also, the enemies should rotate with the movement so that they’re going straight.
So is there a general rule of thumb or common practice in creating such paths? Is it one of the two I mentioned and I’m just thinking about them wrong?
Thanks for the help.