Cloning problems

When I make multiple Man models I can animate them seperately, but when I want to alter vertex colors on the Man model it changes the colors for all the Man models. When I try cloning or deep cloning the node, the geometry in the node, or the mesh in the geometry I get various problems like the animation not working and vertex colors not working.

Can anyone help me solve this problem? Is there a way to turn off the asset manager cache and create a completely new model each time as I am sure that would fix this problem.

Oh, I seem to have fixed the problem using this line before loading the Man model.

((DesktopAssetManager) Registry.get(“assetManager”)).deleteFromCache(new ModelKey(“Models/Man.j3o”));

Is using the desktop asset manager a good idea?

If the model already has a color buffer then that buffer will be shared by default. The simplest way of dealing with this is to just create a new color buffer when you’re planning on modifying it.

OK, thanks for the suggestion.

I got it working, your suggestion was a great one. Thanks

1 Like