jamesmintram Posted June 18, 2013 Share Posted June 18, 2013 Hi Guys, I need to copy a model to assign a different material to it. To do this I use Entity::Copy(). However, the copied entity does not seem to animate, I have queried the number of animations the copy has and this is reported correctly. Is there anything in addition to Entity::Copy() that I need to do so that the animations work with the copy? Regards, Quote Link to comment Share on other sites More sharing options...
cassius Posted June 19, 2013 Share Posted June 19, 2013 I havn;t done this in le3 but it worked in le2. I seem to remember I gave the copy a different name.But I did not change the texture. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
jamesmintram Posted June 20, 2013 Author Share Posted June 20, 2013 I still haven't managed to fix this. My Code for creating a copy is as follows: Model *fullComputer = Model::Load("Models/Borgs/combinedAnimations.mdl"); Model *fullHuman = (Model*)fullComputer->Copy(); fullHuman->CountAnimations(); returns the same as fullComputer->CountAnimations (); However, fullHuman remains un-animated. Is this likely to be a bug? Regards, James Quote Link to comment Share on other sites More sharing options...
ZioRed Posted June 20, 2013 Share Posted June 20, 2013 I tried to use Copy on my testing project and you're right, no animations are played on it. Though I don't know if it's working as expected or not, but on the reference page it says "Copied entities are unique and will not be rendered in batches. Consequently, it is preferable to use Entity::Instance() when possible" so I tried to replace Copy with Instance and the animations worked again. What is strange now is that Instance method is displayed with strike format in the Entity reference page, which usually in the world should mean that a command is deprecated/obsolete and should be avoided. Quote ?? FRANCESCO CROCETTI ?? http://skaredcreations.com Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.