This is something akin to a thrown grenade but I want to add gravity into the movement. After the apex/arcPowerScalar start adding more speed into its downward trajectory.
Also, I would like to know how I would convert this to steering the movement to a direction rather than a position as I want it to continue to move even after it reaches its target position. Let’s say if the player jumps and the end position is set, the projectile will just stop at where the player jumped rather than keep going in the arc until it reaches the ground.
The code in the first snippet doesnt seem to care about where its going to end up. Would I need to have some kind of calculation to determine how much velocity is needed to be applied in order to get to that target position?
What I like about the code in OP is that it allows me to adjust when and where the arc/apex occurs. Sometimes there are objects that need to be arced over like tables and such so it allows me to have more control.
The crazy part of my brain immediately thought of using the Splines package, but the sane part of my brain smacked it and told it to find the closest thing to a cheat sheet of formulas which is what the above link is.
lol until Coriolis effect knocked their abacuses and slide rules off the table. Fun fact: Mr. Coriolis died 70+ years before the popular usage of the term “Coriolis effect”.