Const Vector3 becomes zero

I’m using the latest babylon version.
I’m declaring a const BABYLON.Vector3 with some numbers that are not 0.
But when I call the variable in BABYLON.PointerEventTypes.POINTERUP the values become 0,0,0. How is possible at all?!

Could you kindly reproduce your code (or just the part of it with the problem) in the Playground?

1 Like

This is weird. Now that I tried it in playground and later again in my code - everything works as expected. Mystery(((


That’s the magic of the playground.

Since I’m here, got another problem - can’t assign a material with a texture.

Line 8: Added light, otherwise it is completely dark.

Line 23: bgMat.diffuseTexture = tex; // not diffuseColor, diffuseTexture


thanks! already found it myself, though, spend a lot of time looking for this(