- Home /
LeanTween.moveLocal sometimes snaps to position rather than moving over time
I'm working on a card game where you can play against the computer, and I'm trying to make it so all the computer's moves are animated using LeanTween so the player can see what the computer is doing. When the computer takes from the discard pile, LeanTween.moveLocal works if the top discard came from the player's cards. If, however, the player draws a card from the deck and immediately discards it, this behavior is seen where the card just snaps into position rather than moving over time to the computer card location. The weird thing is both situations use the same method, and I debugged and ran breakpoints to make sure the transform.localPosition of swapCard is not Vector2.zero before the LeanTween.moveLocal call. Any ideas what might be going wrong here?
[1]: /storage/temp/155560-unity-answers.png