Hello, in my scene I would like to utilize freezing of active meshes as it gives huge performance boost. Usually some “falsely rendered meshes” are cheaper, than analyzing of their activeness each frame.
But I run into big trouble when using instances - in my scene, most of the instances are moving and I am unable to make it work. Each time I create an Instance, it becomes “motionless” as well as the origin mesh that normally moved before.
Please take a look at this playground: https://playground.babylonjs.com/#5APWUZ#1 and just comment this var box = BABYLON.MeshBuilder.CreateBox(“instancedBox”, {size: 0.1}, scene); and uncomment this var box = this.box.createInstance();
My typical approach is in each loop
- Unfreeze scene when I need to add some new meshes (or just to actualize active list sometimes)
- Do the creation of meshes
- Freeze scene at the end of each loop in which it was unfrozen
Do you have some hint whats wrong ? I am sure that I am not the only one facing this problem, but I was unable to find solution anywhere.
Thanx very much in advance !