Hey,
I have a problem with the function Project function inside the Vector3 class.
This is my code:
var screenXY = BABYLON.Vector3.Project(
new BABYLON.Vector3(10, 10, 10),
BABYLON.Matrix.Identity(),
scene.getTransformMatrix(),
camera.viewport.toGlobal(engine.getRenderWidth(true), engine.getRenderHeight(true))
);
What I want to do is get the 2d screen x/y position from a 3d vector.
And this is what gets returned from the function:
Vector3 {x: NaN, y: NaN, z: NaN}
How can I fix this?