How can i make Curved UI

why would you make it a sphere, just rotate it slightly away from the camera

what do u mean by rotating it?

if i did that it would only work for the top right and not for example the top left

not make the part directly look at the camera but make it look a little to the left

i want this to work for the entire UI not just top right I gave the top right as an example

then rotate it depending on where its on the screen so it its lookvector is to the left if its on the right side of the screen, and to the right if its on the left side

this means I would have to make every UI element a part? doesn’t seem performance friendly

i forgot you can’t use surface gui in viewport frames so that wouldn’t work

i see no other way of doing this

1 Like

so there’s no way? then how did that game do it while not taking a lot of performance?

invisible parts dont affect performance very much because theres nothing to render, it probably only wastes a few bytes of memory at worst

1 Like

Well if so how would I get the position of the element in 3d and make it rotate in that way?

you can use CFrame.lookAt every frame and make the part look at the camera + some offset

how would I get the offset of the element?

sorry i cant really help you with that anymore, but maybe you can get the angle of the ui part from the camera multiply the offset by that angle, so if the angle is 10° the ui part would look at the cam position + offset * 10, but thats just a really rough idea on how you might try to go about doing this

I don’t think that would work because for you to get the angle you would need to get the position so u can use CFrame.LookAt since it requires a from and at value and even if we don’t use it how would u get the angle?

also how would this work with z index and some frames being above others

you already have the position if you know exactly where you want to put the ui, its just the position you want the ui to be at + camera position

and to get the angle you get the angle from the camera lookvector to the direction to the ui part, and you would need both the azimuth and altitude angle so you’ll need 2 offsets, X offset and Y offset
you can google how to get angles from vectors

and i think youll have to set ZindexBehavior to global in the surface guis

how would I get the position / this?

you put the part in front of the camera where you want it to be and subtract the position from the camera in studio