I’m working on a “door” configurator. The door is animated via FBX so I am loading in one animation that has multiple door panels. The idea is I can hide and show the panels based on user selection.
When I try to disable stuff in the graph it doesn’t hide the panel. Here’s the code:
var graph = this.hero.model.model.getGraph();
graph.findByName(“Hardware_Top”).enabled = false;
console.log(graph);
A screen shot of the console log is included below. The object is shown as disabled but it’s still visible.
That works. Doesn’t seem like the greatest way to hide stuff though…feels like a engine bug maybe?
P.S. started implementing the setLocalScale deal as a workaround until I realized the FBX animation has scale keyframes, so all the panels appear when the animation runs. Not sure how to get around this issue now.
Right now all the playcanvas functionality is encapsulated in a proprietary framework I wrote for a client and the whole thing is embedded in a reactjs app. It’s for a project bid too so not sure if my client wants that available or not. If I get the go ahead I’ll see if I can create a vanilla javascript app that loads the model and tries to hide the nodes and upload it.
@jhinrichs Just coming across this post again from another and I just remembered that disabling a graph entity doesn’t remove it from the scene graph. I vaguely remember that there is some code that adds/remove the mesh from a render list of some sort. The code logic can be seen when you disable/enable an entity.