Hi everyone. I’m trying to retrieve the screen coordinates of a Vector3. I’ve been playing with the vector.project method but I can’t get it to work as I’d like. Here’s the best shot I had so far: myVec3.project(new v3d.PerspectiveCamera("__DEFAULT_CAMERA__"))
but it doesn’t work at all.
You should use the application’s main camera for that, it’s available from the application instance as app.camera. Also, the project method returns coordinates in range of [-1, 1]. You can convert them to screen pixels like this: