World To Screen Point

I think i found the answer: If world to screen to point is Vector3.Project … then Screen To World point must be Vecter2.Unproject

From @Deltakosh

var vector= BABYLON.Vector3.Unproject(
                        mousePosition,
            	        engine.getRenderWidth(),
                        engine.getRenderHeight(),
                        BABYLON.Matrix.Identity(), scene.getViewMatrix(),
                        scene.getProjectionMatrix());

where mousePosition is the Vector2 with the screen X/Y coord you want to convert to world space

Right ???

1 Like