Hi there, in my recent post the functionality of changing the green sphere to blue worked. However, returning to my local version, after a 2-hour break, this functionality stopped working for some reason. No problem…I’ll just download the working version from the playground. I did so, but it did not work locally. I even tried uploading the working version to see if the project must be online to work…it didn’t. I am stumped, bamboozled!
I was nearing the end of this project… it feels miles away now. I hope someone can help me.
I am away back to try and figure it out myself, if I can.
Yes, you do have to select the gizmo to change the sphere to blue. I know, ideally the gizmo should appear when the sphere is created. But it is just my inexperience with programming that is to blame for the need to click again. (I do need the gizmo).
Hi again Evgeni_Popov, yes, the local and Playground versions are the same. In my local version, I don’t seem to have any errors while trying the 3 steps to turn the sphere blue.
Strange thing now is that I can’t get the Playground version to go blue again…Iabris managed it okay earlier.
Have you tried the Playground version locally yourself?
Fabulous Evgeni_Popov…thank you very much. I would never have worked that out.
Regarding my earlier post (post link at the top), if you have the time, could you possibly give me just a hint of how to keep track of selected/created meshes in an array, for the purpose of disposal. Just something to get me started, so that I can work on it. No problem if you can’t.
You could have a global array const selectedMeshes = []; declared at top, and in your function that handles mesh selection do selectedMeshes.push(mesh) where mesh is the selected mesh.
Hi Evgeni_Popov, just to say thanks again for the code you supplied.
Unfortunately, with me being new to Babylon.js (and JavaScript), I just couldn’t understand them. And that was after many hours scratching my head, Googling, and searching the forum (no your fault).
I have a new post asking if someone could kindly help with this, just to get it finished. If you are interested the post is here.
Cheers, and thanks again for the help you have given me.