WorldToViewportPoint incorrectly returns scale

The wiki describes the function to return pixel offsets, and this occurs as expected with the workspace.CurrentCamera

However, cameras other than the currentcamera will return scale instead of offset (I do think this is more useful, but I think that there should be consistent behavior between the CurrentCamera and other cameras)

But if you guys fix this please let me know in this thread (it would be nice to know when you fix bugs in general) because I’m currently relying on this behavior

5 Likes

One camera can be attached to several ViewportFrames with different sizes so it can’t return a pixel offset. The camera’s ViewportSize is (1,1) if it’s not the Workspace camera. That’s why it returns like a scale.

7 Likes

WOW! You just helped me how to position icons on the minimap. Thanks! I have been wondering this problem for 4 days!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.