How was this marker created?

Well you probably already know to store the initial coordinates. Then I would start researching ‘bounce’ or ‘elasticity’.

Here is a kirupa tutorial you can look into :
elasticity

and here is something else I found: bounce

Hope these help.

:hr: