Devlog #3 That's a "Far Reach" from Ordinary


The next ability on the list was very similar to the last, "Far Reach", it's essentially a teleport ability except instead of instantly teleporting to the target location you quickly rush towards it. This at first was difficult to think about, because how do you reliably rush towards an arbitrary point?

My solution was to re-create the Unity function, 'Move Towards', which as the name would suggest moves a value towards another value. The advantage of using this over something like a linear interpolation, is that it doesn't require the start point or the alpha/t value that other interpolation functions do, instead taking in the current, target and max delta.


Once I had the Move Towards function implemented, it was time to work on resolving the other issues of gravity and velocity carry-over. The gravity problem was solved by setting the players' gravity scale to 0 at the start of the rush and back to 1 at the end of the rush. As for the velocity carry-over, I just store the velocity before the rush, set the players' velocity to 0, and then back to stored velocity after the rush. Here's a short demo of the ability in action:

Get Ability System

Leave a comment

Log in with itch.io to leave a comment.