How to make Reverse() work

  • I have a character that uses spline move to move from the start to the end of a path. Later on I want it to move from where it is back to the beginning. I tried using Reverse() to do so, but it teleports the character back to the start instead of moving it gradually and I get this in the console log:

    DOTWEEN ► This Tween has been killed and is now invalid

    Am I using Reverse incorrectly? What should I be doing?

  • Reverse() is a method that is meant to be called during movement. There is nothing to reverse after the tween reached its end, which is when it gets cleaned up and does not exist anymore. The log message you are getting indicates that the tween already finished and you are then calling Reverse().

    When no current movement is active, set the "reverse" boolean to true and call StartMove() like before.

Log in to reply