Hey, DevForum!
I’m trying to achieve something with fairly basic trig - can’t figure it out though.
https://gyazo.com/e2e8e7ea5af674469bf641cc6ccbd865.png
I’m trying to make it so this rotates about the point like a radial dial - i.e. a speedometer, etc.
I can’t figure out what to do though - I’ve tried my attempt at trig but I’d appreciate some pointers. Not asking for a complete solution.
Cheers!
2 Likes
You could parent the ImageLabel to a new frame, parent that to the dial on there, and just rotate the new frame, I think.
The quickest way would be to make a frame that fills your gauge/meter, UDim2 of (1,0,1,0), then making an imagelabel or decal or a rectangle of some sorts that represents the dial that you put inside of this frame. Then you can just use the Rotation property of the frame depending on the value of the gauge.
It’s way easier to do that way instead of using trigonometry. (It also enables you to use images )
Edit:
In case you want to explore more radial UI elements, you can take a look at this awesome API someone made on the devforum: Radial Sprite Sheet Generator for Circular Progress Indicators
You most likely won’t need it for the speedometer, but it can be nice in other radial UIs.
3 Likes