Hi!
I’m trying to dynamically display text on these paper grids. I pass the grid dimensions and their initial x and y values to my displaying function. The issue Is that I don’t know how to convert the values inherent to the scene to that of the viewport. I tried a conversion suggested by ChatGpt where essentially the vector with scene coordinates gets projected onto the camera and the result gets applied as follows:
const screenX = (vector.x + 1) / 2 * window.innerWidth;
const screenY = (-vector.y + 1) / 2 * window.innerHeight;
That’s why the bneofdk is randomly positioned here.
Can anyone please suggest a reliable way where I could for sure translate the scene coordinates to pixels?
Thank you!