I am working on improving a throwing mechanic I have for my project. I've included an unlisted video (10 sec long) which demonstrates the current solution.
https://youtu.be/Cot6Qk3N_xI
As seen in the video, the orange dotted line indicates the trajectory the thrown grenade will have. The orange dot object act the same way as the grenade, spawning every frame to give the illusion of a line, and is destroyed on collision with an obstacle. You may notice that upon pressing the throwing button, the dotted line has to travel from the player to the ground before illustrating a line, as well as readjust in the same pace if any mouse movement is applied.
What I would like is to replace this dotted line with a solid curved line that is instantly drawn upon pressing the throwing button. That way you can instantly tell where the grenade will land, regardless if you're moving the mouse.
I am unsure as to how to draw a curved line that will match the output of the thrown grenades physics. Does anyone have an optimal solution to this? Thanks!
Best regards,
Tobias Edvardsen