spacekit icon indicating copy to clipboard operation
spacekit copied to clipboard

addObject() not working

Open migbash opened this issue 3 years ago • 2 comments

I have an spaceObject that I store in an array[ ] of spaceObjects, which I use the remove from the simulation upon a button click, an then make the spaceObjects reappear on another button click using the array of spaceObjects and it does not work at all :/

migbash avatar Dec 01 '20 04:12 migbash

hmm, is there any chance you can provide a jsfiddle as an example?

typpo avatar Dec 01 '20 05:12 typpo

Yes, so when I try to remove some SpaceObjects() from the Simulation, and then add the same SpaceObjects back in, they do not work. I got them to work by re-creating the createObject() all over again, which I used as a quick hack.

image

, where target_sat contains the SpaceObject object data, & viz is a global defined simulation variable.

And using the viz.addObject() with a SpaceObject object, does not seem to work.

migbash avatar Dec 24 '20 02:12 migbash