How to do Aim Calculations?

I know that this might be complex (in Gdevelop) but I was wondering if anybody figured out how to solve for the angle needed to shoot an arrow towards a target. Basically what I need is how to calculate the angle needed to shoot an arrow from the enemy towards the player given:

  1. The position of the player (pX, pY)
  2. The position of the enemy (eX, eY)
  3. The velocity the projectile is being shot at (750 px/s)
  4. The force of gravity (9.8 * 100)

All my previous attempts at this have failed (I believe due to Gdevelop’s weird coordinate and rotation system). I hope that someone can succeed in this.

Do a search on the interwebs on “projectile trajectory calculation to target” or ask ChatGPT, and translate the results into Gdevelop events.

I did both of these (I even tried 5 different LLMs!). I was wondering if anybody before me had done this. It seems like it should be trivial but it does not work!