Creating a UI element that starts as a filled circle then arcs out following a radial form drawing a path behind it as it moves back to its original position.

Or, in other words drawing a circle.

3 Likes

unit circle

``````for degrees = 1,360 do
end
``````

Obviously youâ€™ll probably want to do some â€śscalingâ€ť with the rotation and size of the frames, but this will give you a perfect center assuming midpoint = 0,0, and then you can just set frame rotation to = â€śdegreesâ€ť and it will face the center

1 Like

Oh, so it has to be drawn in segments. I was guessing that would be the case; that would be cool if they added a radial image slicing property for ImageLabels.

Yeah it would have to be done in segments, though you could do it pretty efficiently and still have it look pretty circular if you tried.

True if it is moving fast enough at smaller segments, wondering how this would impact performance on the client though; probably just fine right?

I scripted something like this back when Destiny 1 came out, it didnâ€™t seem to really impact client performance that much and I did it really inefficiently. I literally did 360 2x2 frames

if I did this today, I would probably make it like 16-24 2x(segment length) frames that use tweening to universally work at any activation speed.

Alright, thank you for the advice.

Sprite sheet. Something like this:

1 Like

what IS THIS ORDER?!

29 Likes

Uhhhh I googled it but you get the idea

3 Likes

Hereâ€™s a wild idea:

(My friend @Zeumus needed the same kind of thing and this method worked fine in the end.)

The ingredients are: a background (full circle), a cap (smaller circle) and 2 half-circles. The half-circles start off exactly on top of each other. The top one is the same colour as the background, so that it looks like nothing loaded yet.

Now, the top half-circle rotates around counter-clockwise until the bottom half-circle is fully visible. Then, the top half-circle appears back on the right side and changes colour. Then, the top half-circle rotates again to the other side.

6 Likes

Funny that you mention that, cause I decided to go with a similar method to this instead of using unit circles (for a couple of reasons); although I am using more arc segments so I can create cool color effects if I want to.

Yet, I am having the issue of dark edges around the arc segment images. Is there any way to get around this, or is it just an issue with Roblox ImageLabels.

2 Likes

I would just like to point out that there was a mistake on the bottom ones, they look a lot more messy lol.

I fear what happens if the person who made this tried making a more complex sprite sheetâ€¦

6 Likes

You could potentially use one circular image asset and some ZIndex magic with other UI elements to fake a radial bar. However, that all depends on the UI design so I suggest segments.

Only a level 10 scripter could make that sprite sheet work

3 Likes

Letâ€™s make it a devforum auto-acceptance test. If you can make it animate smoothly, youâ€™re automatically in. you deserve it.

3 Likes

Donâ€™t know if this is still relevant, but I recently found this article by @Quenty that teaches how to solve that. https://medium.com/roblox-development/fixing-images-in-roblox-ui-to-look-good-2e0a7880b1ec

5 Likes