How to adjust size and position relative to a given a value between 1 and 0

So I’m writing something that concerns dot products. I’m using the dot product, to check if the camera is looking torwards the sun, and using that to create a lens flare. This is not supposed to be professional, is just gonna be a quick creation.

image

The thing is, I’m not sure how I would change the sizes of the circles that are making the lens flare’s shape, and how to adjust the gap between each circle.

This should explain things

I found this which was so good, and I saw how they did it, but still not sure.

I tried stuff like multiplying by the resulting dot product (the dot product of the camera’s lookvector and sun’s direction using :GetSunDirection()), but it’s definitely not working. I’m basically looping through each frame, where v is the current frame.

v.Size = UDim2.new(0, v.Size.X.Offset*dot,0,v.Size.Y.Offset*dot,0)

Any ideas? It’s alright if I end up not using the dot product as a way to adjust.

2 Likes