I’ve discovered today that the reliability of WorldToScreenPoint and WorldToViewportPoint is pretty lackluster on any device that isn’t PC or Console. This can be observed in studio using the device emulators. I have this scene and I’m using attachments to determine where to put my UI labels:
I’m using the following code to position each label:
local vector, onScreen = workspace.CurrentCamera:WorldToViewportPoint(workspace.AVATARNAME.PrimaryPart.Attachment.WorldCFrame.Position)
if onScreen then
UI.Label.Position = UDim2.new(0,vector.X,0,vector.Y)
end
On PC and Console devices, this works flawlessly as intended:
I have IgnoreGuiInsent enabled, and I have ClipToDeviceSafeArea disabled, SafeAreaCompatibility set to None and ScreenInsets set to None.
On any mobile device, the position WorldToScreenPoint and WorldToViewportPoint returns is always wrong and off target by a degree that changes PER DEVICE, so it’s impossible for me to account for:
This occurs both in studio AND on real devices…