Its the start of a new week and I have begun my new enemy type Black hole vortex. So the idea is that the black hole will instantiate from side of the screen and use force to pull the player towards it and damage. Had a good start by creating the sprite and animation. That was the easy part! Then is was getting the black hole to move from one edge of screen to the next, but I didn’t want it to just be on a linear movement. This is space, right? Found the right info on what I’m looking for to make it have float motion. Here is what I found.
The use of a Bezier Curve, which uses four control points to determine the curve shape. Here is a visual of how this works.
By moving the positions of the control points I was able to make a wave motion.
Next was to instantiate the the black hole. through trial and error I found that the previous spawn method would not work because the the range of spawn was off of the x axis and my black hole should range on the y axis. I rewrote a new coroutine for this to spawn correctly. New challenge is to create the gravity pull of the player. I have tried different implementations but was unsuccessful as I don’t fully understand the methods being used and need to dissect it for me to figure out the problem.
New goal for tomorrow.!