I'm experimenting with a 3D game using the 3d shape and 3d object tool, but one issue I've run into is displaying relevant text matching the perspective of the camera. I'm working around this by having a UI layer that displays the text.
I have 2 different types, text for when you mouse over an object, and text that pops up next to a player when they speak. The first one was easy, I just set the position to Mouse.X/Y("UI"). The second one I'm having trouble with.
For the second one, I'm using LayerToCanvasX/Y("Game",Animals.X,Animals.Y), and sometimes it works if the window is just the right size, but as soon as I resize the window or go fullscreen the text is severely offset. I'm assuming this is because canvas coordinates change because there are technically more pixels in the window, but is there a formula I can use to keep this text consistent? Thanks!