Created
December 16, 2023 10:45
-
-
Save flushpot1125/c7b36d438e41c0fbd6e136aa5670f124 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create reflecting surface for mirror surface | |
var reflector = new BABYLON.Plane.FromPositionAndNormal(glass.position, glassNormal.scale(-1)); | |
//Create the mirror material | |
var mirrorMaterial = new BABYLON.StandardMaterial("mirror", scene); | |
mirrorMaterial.reflectionTexture = new BABYLON.MirrorTexture("mirror", 1024, scene, true); | |
mirrorMaterial.reflectionTexture.mirrorPlane = reflector; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment