I am working on a boardgame which uses a viewport for the die-rolling visuals. When the dice lands, I want a number to appear above it (as a UI). This is easy enough to do on one screen size, but because I want to support a variety of screen sizes, I’d like to be able to accurately find the screen position of the die object, which I currently do not know how to do.
I’ve tried using WorldToViewportPoint and WorldToScreenPoint (using viewport camera and die position) but they did not seem to work as intended for viewports.
If anyone has any idea on how to implement this, please let me know