Hi, I am using PlayCanvas 3D HTML5 Game Engine this project.
If I try to change skybox at runtime, the project stops working.
This is the project I tried changing skybox, USE SWITCH BUTTON.
https://playcanvas.com/project/1047990/overview/water
Thanks in anticipation,
Hi @Faiq_Laiq,
It seems the cubemap you are passing isn’t prefiltered so it doesn’t contain all the cubemap faces required. Try prefiltering it before changing the skybox.
1 Like
Then you need to remove the skybox mesh instance from the reflection layer list.
There is a method that is listening to the “set:skybox” event in the water.js script, that responds to that change. Make sure you handle that even when you are clearing the skybox.
2 Likes
Thank @Leonidas , I really appreciate the help, only removing the skybox mesh instance from the reflection layer list. does the job.
1 Like