I want to play the video when the camera is close to the front of the mesh. At present, my way will cause the camera to play the video when it is close to the mesh in any direction. Is there any other good way to detect that the camera is close to the front of the mesh and then play the video? and I hope video also supports click pause
I corrected your example, because the videotexture was flipped horizontally - https://playground.babylonjs.com/#ZMCFYA#78
ANote0VideoVidTex.uScale = -1;
(the same thing exists in the original example from Docs; I suppose I’ll make a PR for that).
You have 2 functions for play/pause, seems because of that the second one (onPointerObservable) doesn’t work. Here is the console message:
Could you tell a bit more what do you mean when saying “in front of”? Does your mesh have facets or it has quite complex geometry? Answers may depend on that.
my mesh just a plane ,verry simple, like playground mesh plane!
I solved the problem，thank you very much !