Object Oriented Models

Software: Away3D 4.x

Avatar
oladitan, Member
Posted: 16 March 2013 04:17 PM   Total Posts: 71

Hello. I have made a class that adds a md5 animated model to my scene.

model1 = new Model();
model2 = new Model(); 


When I try to make more than one instance of this class I get an error:

[Fault] exceptioninformation=ErrorA Material instance cannot be shared 

How do I stop this error. thank you.

   

Avatar
Fabrice Closier, Administrator
Posted: 16 March 2013 06:44 PM   Total Posts: 1265   [ # 1 ]

The error says a material instance cannot be shared…
What about not sharing the material?

   

Avatar
oladitan, Member
Posted: 16 March 2013 07:54 PM   Total Posts: 71   [ # 2 ]

Thanks for the response Fabrice. The two models are the same. I would like to have exact duplicates of the same model.

   

Avatar
oladitan, Member
Posted: 01 April 2013 09:05 PM   Total Posts: 71   [ # 3 ]

Oops. My initial approach was all wrong. I was trying to make a class for each type of animated model and then just make objects as I needed more. Now I am trying to make a Class of assets that just gets loaded once and I can just clone from there. Thanks.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X