You know how in Galaga the enemies sort of expand and contract from each other? I'm really having a hard time thinking of a logical way to do this.
My first attempt yesterday was to make additional points for them to go to. So when I assign them their coordinates, they are also assigned additional points (the expanded point, and contracted point)
That was easy, but then after I tested it I found out that they all dont move in uniform and they move too choppy. So its back to the drawing board for me.
Anyways, I've asked around and was given some information about an epicentre, and use cosine(time) * scale factor * original distance from epicenttre. and use slightly different scale factors for X and Y for more elliptical expansion. Could anyone tell me how they would code this? Perhaps its something simple to understand?
My first attempt yesterday was to make additional points for them to go to. So when I assign them their coordinates, they are also assigned additional points (the expanded point, and contracted point)
That was easy, but then after I tested it I found out that they all dont move in uniform and they move too choppy. So its back to the drawing board for me.
Anyways, I've asked around and was given some information about an epicentre, and use cosine(time) * scale factor * original distance from epicenttre. and use slightly different scale factors for X and Y for more elliptical expansion. Could anyone tell me how they would code this? Perhaps its something simple to understand?