Considering that this game is not meant to be a hardcore shooter, I will build distance attack into curve.
Kasha’s ICATHIAN RAIN skill in League of Legends is a very good reference.
Such an attack method can greatly reduce the efficiency of the attack, thereby weakening the weight of the game.
SSo now only the curve of the attack is needed. Curve We mentioned the bezier curve in the <spider attack event> blog.
fmp 05/11/2022 – Yuanhang Wu | MA 3D Computer Animation Notes (arts.ac.uk)
But what I need to use here is a high-order bezier curve.

It can be seen that the seven points A1 to A7 in the above figure control this curve. And these seven points can be calculated by the vector of the ghost pointing to the target and the ghost forward vector.

As can be seen from the above code, I used a lot of Random functions to randomize the positions of A1 to A7 so that each curve is different.
I recorded a demo and set the missile to lightning.
I think the effect is not good enough. Fortunately, I have built a tail effect in a previous project, which happens to be useful here.
So let me add the tail FX to the missile and see the effect.
nice! It looks great.
Tomorrow I will start building the last function of the game: player shuttles from 2d to 3d.