I am currently trying to code an edited Chonshu hyper move that drains life.
I had manage to edit the hyper projectile to homes into the opponent (even midair :^D)
However i have issues calculating the trajectory of the returning projectile esp when the target is hit mid-air.
Assuming an right-angle triangle when target is hit in mid-air with Chonshu on ground, i am assuming:
Opposite = p2BodyDist Y
Adjacent = p2BodyDist X
I use the below expression formula to calculate my return trajectory of the returning projectile of Chonshu edited hypermove for my Scrtl:VelSet,
X = Cond(p2BodyDist X - Pos X > 0, p2BodyDist X % 2 + 1, Pos X % 2 + 1)
Y = Cond(Enemy, Pos Y >= Root, Pos Y, -1.2, tan(45) * p2BodyDist Y / p2BodyDist X)
The issue here is Y... -1.2 for Y works perfect when target is hit on ground, but problem arises when the target is Hit mid-air... the returning projectile sometimes go beyond below my character. Or simply way above my char. Can the veterans pls assist?
Do be warn this is rather complex and i had used a few googled calculations but seem nothing working ()