Hello all, I’m having some difficulty with cloned entities in my code. I have a “PreFabs” that is simply a plane with a material and a script, it’s purpose is for billboarding text during development. My issues is, I set the text to be the index number of the element, but for some reason, that all get assigned the value of the last one created. I even set window.root to app.root in the initialize method to find each individual entity and they all have their unique text values, but they are only rendering the last created entity’s value. Feel free to peruse the project: project_001
Now I feel like an idiot… that was so obvious - lol
One more thing: I used code from a user named will for the billboards, but my camera is different and the rotation isn’t correct, everything is slightly skewed, any suggestions?
var cloned = pc.app.root.findByName(“apple1”);
var e = cloned.clone(); // Clone Entity
cloned.parent.addChild(e); // Add it as a sibling to the original
e.setPosition(1,1,1);