# Hollow circle forming (?)

Hi, how can I make this ring?

I can’t seem to figure it out. I want it to rotate smoothly. By ring, I mean the line that forms a hollow circle.

I also tried to look for a post on a DevForum, but I don’t know what the effect is called.

Here is the video reference (the green circle inside that turns to red) https://cdn.discordapp.com/attachments/765906615701733396/796395294857363468/video0.mp4

1 Like

Can you show us on a vid on YT or gyazo. I don’t think people like to launch unknown mp4 sources.

This is what the mp4 showed

I think what you should do is either simple but not efficient; go in photoshop and make your own scrolling frames (perferably 360 frames) efficient way; get a scrolling image like this then rotate it.

## Math way, cause you know me

Create a viewport frame then manipulate the objects orientation and position so that it is aligned with a center point (see slerping quaternions) then align the viewport camera to be facing in front of the rotating area. Apply a local rotation offset each time step and repeat this animation.

1 Like

Yes, I might do that, but now I searched for a circular progress bar and found some DevForum posts. It lags a bit, but I will still try though. Thanks for the idea.

The more you iterate the less laggier it gets

If I am correct, this statement is false. Iterating will always lag for the duration of the iteration. It doesn’t even make sense that if it iterates longer, there is less lag as it is still iterating which costs little performance in the first place.

This is a very big misconception, allthough techniquely use, the program has to use more clock steps it is minute in comparison to rendering. We are simply manipulating pixels on a screen with simply algebra.

Your whole post confused me. Correct me if I’m wrong but you think I am wrong with iterations? After looking over your post, you don’t explain why or defend your thoughts. Iterations take up the same performance for its entire duration since it is practically repeating the same steps over and over again. I don’t see how it would get less “laggier” the more it iterates?

Record the os.clock() delta time from rendering a part vs rotating a gui. Rendering a part takes much longer in comparison to the rotating gui. The reason it appears laggy is cause in a sense the turn rate is so slow compared to the perimeter of the circle in a sense and since they want to capture it within a given time limit it causes this jumping effect, giving the illusion of lag.

How does this have to do with iterating? I am almost certain iterating for one is a really inefficient way to accomplish the OP’s goal.

Let’s assume we go with your bias that thier clock render is the same. If this is true then any scenario will simply “create lag” like you suggest. What we are doing is simply finding a approach that creates the least lag. Whether that is with interpolation for 3d primitives or in this case simply rotating the gui.

To add on what I am trying to say is she can tweak her iterations in a sense to be a resolution. It will look laggy with very low resolution but like you said it will be laggy if we are moving it 0.0000000001 * e^-5. What we are doing is finding the minima of this function then in a sense rotating that rotation by it per interation. Suppose we have a iteration of 2 per rotation then that would mean that we rotate it 180 degrees each yield time. The yield time is up to her. Is this where you got confused? That there would be no yield time? Did you think I was doing something like this?

``````for i=1,100000 do
gui.Rotation += i/gui.Rotation * 360
end
``````
1 Like

Oh, my pronouns are “he/him”. This is not my actual avatar.