i want to achieve 3D Ui with viewmodel that sways slightly, i started on working on positioning the parts so they dont go off screen when screen size changes,
issue is, when moving one part, it moves correctly no issue, but when moving another part thats slightly taller in size else its same its shifting weirdly
welding them together, didnt work at all
the issue is with the hotbar
local function adjustToVS()
print("adjustingVS")
local screenWidthStuds = getViewportWidthInStuds()
local ar = vm:WaitForChild("ar")
ar.Size = Vector3.new(screenWidthStuds, 0.01, 0.01)
local halfWidth = ar.Size.X / 2
local off = -0.2
local centerPos = ar.Position
local leftCornerWorld = centerPos - ar.CFrame.RightVector * (halfWidth + off)
local rightCornerWorld = centerPos + ar.CFrame.RightVector * (halfWidth + off)
leftCornerWorld = Vector3.new(leftCornerWorld.X, centerPos.Y, leftCornerWorld.Z)
rightCornerWorld = Vector3.new(rightCornerWorld.X, centerPos.Y, rightCornerWorld.Z)
local status = vm:WaitForChild("Status")
status.Position = Vector3.new(leftCornerWorld.X, status.Position.Y, leftCornerWorld.Z)
local hotbar = vm:WaitForChild("HotBar")
hotbar.Position = Vector3.new(leftCornerWorld.X, hotbar.Position.Y, leftCornerWorld.Z)
local noti = vm:WaitForChild("Notifs")
noti.Position = Vector3.new(rightCornerWorld.X, noti.Position.Y, rightCornerWorld.Z)
--findRel()
end
(the taller part above shorter part is the hotbar)
the hotbar part moves a bit more than the status part (short one) and is weirdly offset
any help appreciated