UI confetti effect?

I was looking around for cool effects for my game and I came across this cool confetti UI.

https://twitter.com/pxkez_rb/status/1012880467278942208?s=19

I’m not sure how they did it. Did they clone lots of UI and randomly rotate and give s random location on the screen and tween to that postion? Also, would cloning about 30 UI cause lag?

Edit: It appears they are in a quadratic movement and not linear. Also seems as they are flipping like confetti does when it falls.

4 Likes

Cloning around 30 frames shouldn’t cause any noticeable lag. And yeah, they’re giving random positions and rotations, then the rotation is tweened (or repeatedly added to).

The position is a bit complex, there are a variety of ways to do it, but one method may be generating a randomized quadratic function and then tweening the x position (I’d only recommend this if you know how they work lol).

1 Like

I believe DevCrut’s Hide and Seek makes great use of the UI confetti effect.