I’m not sure what is going on but when I try to paint a canvas it seems like there is some kind of offset. Very strange behaviour.
When I try test it using the playground, things are fine and work as expected. (Notice how I marked each point)
But when I do my own test(without playground, with exact same code and setup) this happens:
I’m marking the exact same spots using the cursor. The grid is just a texture in the context of a texture canvas rendered in a plane(BabylonJS ground).
I suspect it has something to do with the canvas dimensions and aspect ratio because when I resize the browser window it messes up completely and the offset is really big. It doens’t happen in the playground don’t matter how I resize it. So I’m trying to understand how did the devs made it so well.