Hi,
enforced issue with my screen space calculation inside NullEngine
.
const engine = scene.getEngine();
const scaling = engine.getHardwareScalingLevel();
const pos = Vector3.Project(
new Vector(5, 10, 3),
Matrix.IdentityReadOnly,
scene.getTransformMatrix(),
scene.activeCamera.viewport.toGlobal(
engine.getRenderWidth(),
engine.getRenderHeight(),
),
);
pos.x *= scaling;
pos.y *= scaling;
pos.z *= scaling;
return pos;
works well in browser but in NullEngine
always returns Vector3(x: NaN, y: NaN, z: NaN)
.
Doing something wrong or its by design so?
Thank You