Hey there !
I'm working on a tower defense game. One of my tower's power is the ability to potentially "teleport" back on it path a mob.
Here is my process :
When the ability happen, i do a getsimplepath from self.gloalposition to Startspawn.
-- Great, on hit, the mob walk all the way back ---
now i want to add a point X pixel away on that path.
Then i want to get the globalposition of that point. (Those 2 steps are the one I can't figure out)
and then, i will reposition my enemy, and re-path his way from self.globalposition to end_path.
I posted before, got some infos regarding offset and add_point but I can't seem to figure out how to make it work.
I'm looking for some help to formulate the process has i has been 2 days and I feel completely stuck on it.
Not able to find any example or even a hint on how to build it.
every answer / input is appreciated :)
ps : here is a pic recap :
