MD5Importer question

I'm reworking my code to use MD5Importer and had a couple of questions, hopefully someone can help:



I'd like to get the world location of a particular joint whilst its moving so I can position other objects relative to the model.  My plan was to work through the relative translations/rotations of the joints until I reached the root; the translations bit was straightforwards but the rotational bit was a bit out of my league! I wonder if someone could offer some help with that, or maybe this could be a good feature to add to the framework?



The second question is about attaching to joints - is there a technical reason why the objecting being attached has to be a ModelNode? Mixing MD5 and simpler models would make life easy but I'm guessing this hasn't been done for a reason.  I guess if I can solve the first problem I can simply reposition the objects myself based on the joint positions though.



Hopefully someone can suggest something, thanks in advance!


if im right, i think u r trying to attach things like a weapon to a charater.



if that is the case, or similar, u should animate ur weapon with the entire model together. this means that the weapon will be in the skeleton structure. then u simply export the weapon with the entire skeleton structure into one md5 file. then load that weapon model as a ModelNode, and use the attachDependent(weapon). this will allow the weapon to share the same skeleton as the parent which is the actual character model.

Thanks for the quick reply neakor - you are half right, I've successfully been able to attach other md5 bits onto my model.  The thing I'd like to do next is position other non-md5 objects (for example a particle effect) relative to the joint positions during an animation.  Any suggestions on that one? 




js555 said:

Thanks for the quick reply neakor - you are half right, I've successfully been able to attach other md5 bits onto my model.  The thing I'd like to do next is position other non-md5 objects (for example a particle effect) relative to the joint positions during an animation.  Any suggestions on that one? 





hmm, u cant really attach anything to a joint. so my suggestion would be attach the particle to the child model node. like if u wanna have a particle on the weapon, u can attach the particle to the weapon model node.