I've got some flying blocks that fly in random directions, and I want them to settle down on top of a particular block with the ID "destination". Here's the issue: I'm calculating the offsets between the destination block and the flying block, subtracting these to determine the distance needed to reach the destination. When I trigger the function that moves the flying block on top of the destination after starting the animation, it correctly figures out where to go. However, the gsap.to function fails to get the flying block to the right spot.
Could someone help me with this?
Here's the link to the project. Unfortunately, I can't use CodePen because this project is based on React.
I'd appreciate any assistance in fixing this issue. Thanks!