The grunt enemies are now capable of divebombing the player. The movement of the grunt enemy is controlled by a Vector3 Lerp command, which I graciously copied and pasted above. Then, I made a simple float variable which increased with Time.deltaTime (the time between frames). This made essentially a timer.
Then, I modified this variable to be itself squared and multiplied by 1.03. This smoothed out the movement to where I wanted it to be. It also - crucially - made the movement exponential.
After this, I added the value which I had made to the y position of the object, sending the enemy careening down. Work still needs to be done on the x-position because the lerp is not working how I thought it would. I’ll keep ya posted! Thanks for reading!
0 comments