How do i curve a 2D tween?

I want to curve a tween for opening some UI, but im not exactly sure how to do this, i want to make it go something like this:


Don’t bully my great artistic skills please

5 Likes

It looks like logistic growth but I don’t think there’s an easingStyle for that

image

Probably some way to get around this but im unsure

Im wrong, path2d is the answer like that one guy said

2 Likes

You might want to explore and research bezier curves. I know this isn’t a lot but its a starting point
Drawing a Bézier curve

1 Like

I did explore a bit into that, but math bounces straight off my head

3 Likes

I heard there’s Roblox modules that allow you to even avoid the math. Maybe look for those?

2 Likes

if it is a circular arc, you could have a parent frame at the circle center. place the image under the parent with appropriate offset, then tween the Rotation of the frame.

1 Like

Bezier is just interpolating between N points N-1 times to get result. Like for 3 points ABD, lerp firstly AB and BC, to get DE, and then lerp DE to get result.
If math scaries you, not go for developing…

3 Likes

Hi! Like EtNowis said you can create a frame and position the element you want to rotate at the boarder. Rotating the Frame via a tween will rotate the UI with it

If you don’t want the UI to be rotated, you can start another tween acting on the UI on the opossite direction with the same properties than the frame’s tween

2 Likes

you can use Path2D | Documentation - Roblox Creator Hub to achieve that

Path2D Full Release - Updates / Announcements - Developer Forum | Roblox

2 Likes

didn’t know about this!
this is the guide, and contain an example that use the tween service too

2 Likes

You can use Path2D Path2D | Documentation - Roblox Creator Hub, it’s documented by Roblox and allows you to create 2D curves.

Edit: Was already mentioned by someone else, my bad! :sad:

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.