hi , I’ve create a model class, so that I can init the model in another class and then put on the scene, question is I can’t init 2 models, the error is the material cannot be shared with 2 or more models. please help me.
How to init 2 same models in the same scene?Software: Away3D 4.x |
||
|
||
|
||
|
||
|
||
Richard Olsson, Administrator
Posted: 27 August 2012 09:35 AM Total Posts: 1192 [ # 4 ] What do you mean they have “the same property”? Some properties have reference values instead of POD values, e.g. material, geometry et c. If you want those to be independent, you have to clone those as well. One way would be to do the following:
myNewMesh = new Mesh(null); Note though that if you can you should always share geometry and materials because that will increase rendering performance. |