what is “The Position”?. Bruh.
bro if you want the ui to be in the center of the screen, then the position is 0, 0, -1, if you want it to the right then its 1, 0, -1 and so on
so u mean i get the x pos and y pos in scale (from udim2) and apply it with -1 as z (to make it vector3)? and then make it look at the cam?
that might work ill try. also thanks if it does work
wait while I was doing this I thought how would ZIndex and object ordering work cuz if I don’t get it to work with those there will be z-fighting
here thats what i meant
local relpos = Vector3.new(-2, 1, -3)
local cam = game.Workspace.CurrentCamera
local pa = game.Workspace.Part
local ang = Vector2.new(math.atan2(relpos.Y, relpos.X), math.atan2(relpos.Z, (relpos.X^2 + relpos.Y^2)^.5))
local xofs = Vector3.new(1, 0, 0)
local yofs = Vector3.new(0, 1, 0)
game["Run Service"].RenderStepped:Connect(function()
pa.CFrame = CFrame.lookAt(
cam.CFrame:PointToWorldSpace(relpos),
cam.CFrame.Position + cam.CFrame:VectorToWorldSpace((xofs * ang.X) + (yofs * ang.Y))
)
end)
it doesnt work 100% but thats the concept
why is there this math wouldn’t it work without it? also, this doesn’t fix the z-fighting and I don’t think u really know what I mean there will be maybe other elements close to each other that might overlap and create z-fighting and if u have a menu on top of other UI it will too
SurfaceGuis have a ZOffset property just adjust it for every ui element until theres no z fighting anymore
ok good idea but if there were 2 frames with the same z index in Roblox normally the newest one is on top but here it would z fight
well i just tried it and surface guis dont z fight either
ok this works but the scripts break also sorry if I’m complaining a lot bc if this doesn’t have a solution ill have to rewrite all the code in a way that makes it work
old is the type of text but not a technique, search in internet that type of text, download it and add it to roblox, or if not look for it if it appears in the default texts of roblox.
You’re probably only going to need a single part for this. Just place and scale the part to fill as much of the screen at you need, rotate it so it’s at an angle, then you can do all the rest like you would with a normal GUI, but with a SurfaceGui on the part rather than a ScreenGui
what I mean is I want to make it so it’s a ball effect so the UI won’t be like it’s on a plane but will be bent so this wouldn’t work
Do you have any examples other than the one you posted before? That one doesn’t look curved, just rotated
No, I don’t have one atm but this isn’t rotated bc if u tried to put a bounding box around it the angle isn’t 90 meaning it’s not rotated
for example here its not rotated
yea, what is the perspective then? no UI objects have a perspective value or anything that’s what I want -_-
There’s not a perspective value you can set in properties. You can either set the part with the UI on it to be at an angle to the camera, or set the camera to be at an angle to the part. The perspective is just what direction the part is facing relative to you