saifshk17 Posted July 28, 2020 Share Posted July 28, 2020 Hello people, I am able to play a video on Plane but unfortunately the video seems to be mirrored, as in flipped. What am I doing wrong in my script? Also, how do I make sure that the video starts playing once the page loads? var ANote0 = BABYLON.MeshBuilder.CreateBox("ANote0", { width: 140, height: 90, depth: 0.100000 }, scene); ANote0.position = new BABYLON.Vector3(180, 30, -425); var mat = new BABYLON.StandardMaterial("ANote0Mat", scene); mat.diffuseColor = new BABYLON.Color4(0, 0, 0, 1); ANote0.material = mat; var planeOpts = { height: 90, width: 140, sideOrientation: BABYLON.Mesh.BACKSIDE }; var ANote0Video = BABYLON.MeshBuilder.CreatePlane("plane", planeOpts, scene); var vidPos = (new BABYLON.Vector3(0, 0, 0.1)).addInPlace(ANote0.position); ANote0Video.position = vidPos; var ANote0VideoMat = new BABYLON.StandardMaterial("m", scene); var ANote0VideoVidTex = new BABYLON.VideoTexture("vidtex", "videos/screencast.mp4", scene); ANote0VideoMat.diffuseTexture = ANote0VideoVidTex; ANote0VideoMat.roughness = 1; ANote0VideoMat.emissiveColor = new BABYLON.Color3.White(); ANote0Video.material = ANote0VideoMat; ANote0VideoVidTex.video.play(); scene.onPointerUp = function () { ANote0VideoVidTex.video.play(); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.