This sounds very tricky indeed. This topic parse(convert)toVector3 ( by reference to canvas or viewport. ) looked at a similar problem and playing around with one of the PGs allows you to re-size the screen and maintain a spheres position as in https://playground.babylonjs.com/#JQJ8UM#7. HOWEVER the camera is not attached to the canvas. Attaching the camera moves the sphere as the camera moves. It might help but then again it could be a red herring. Hopefully others more knowledgeable may have more ideas.
JohnK
2
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Camera, maintain the meshes at the same position relative to screen during screen resize | 10 | 2236 | March 20, 2020 | |
| Position a mesh to follow DOM element's position | 4 | 561 | September 16, 2023 | |
| How to position mesh in the corner of viewport | 2 | 330 | December 28, 2023 | |
| How can a mesh always appear the same size no matter where the camera is | 8 | 407 | March 29, 2023 | |
| Size scale attach to the camera | 16 | 3737 | February 18, 2019 |