I created the widget and added all of the buttons in an array as a canvas slot.
I used a timeline, a lerp function, and a foreach loop to create the animation effect. The problem I’m having with the animation code I wrote is that it moves all the buttons to the 200 axis on the canvas instead of moving all of them 200 unit away from their position.
Wrap your buttons in Horizontal Box and a size box then add animation, select the Size Box and hit the key frame button. After that set the end time for animation, then change the position of the size box to 200 and hit the add key frame icon.
when you say loop i’m not sure if you mean you want the animation to loop or if you are referring wanting the for each loop. either way i’m not sure why a horizontal box would be an issue.
since i’m not sure what you’re going for I’ll just point out some things more generally. first, your loop is running again and again every time the timeline updates. second, the get position node is returning whatever value the button is currently at, and since that location is moving that value is not returning the initial location of the buttons.
maybe something like running the loop prior to the timeline and setting the position to a variable would work. i’m not sure that the would move them together or if it would move it one after the next.
So I come up with this but there is another issue. Only the last button moves. The others stay firm. I did some debugging and noticed the timeline skips the first 4 items and only updates the last item. What could be the issue?
Have you had any success with this yet? I been sitting on this for better part of the day and so far the only thing I can do is move buttons from left to right, but it’s instant no animations. I would post a video I have made but youtube seems to be down.
Not yet, I haven’t been working on it. I had an issue with the timeline. Are you interested in this? If you interested just follow the repository. I’ll update the code. https://github.com/saadat99/LoopScroll