Where are my children!?
Blitz3D Forums/Blitz3D Programming/Where are my children!?
| ||
Sorry for the exciting title, as this isn't exciting at all ;) I loaded the model of an gun I made in good ol' Milkshape into B3D and I can't find any child with FindChild and CountChildren even returns 0! How is this possible - the damn thing has got plenty of children in MS3d!? Regards, Kungfista |
| ||
What format did you save it in? Also, FindChild is case-sensitive. For that reason, its best to name children in all upper case or all lower case - not a combination of the two. |
| ||
I know about the case thingy and the format is B3D. I didn't encounter any problems finding childs in B3D models so far... at least I had no problem finding the "right wrist" bone of the B3D-guy who holds the gun. As you might guess I'm trying to get the muzzle of the gun now ;) |
| ||
Right - try doing a FindChild on the "right wrist" instead of the character. The thing is, the muzzle is not a child of the character mesh, it will be a child of the gun (depending how the model is constructed of course). Entity hierarchy can get confusing. There's probably a recursive "FindChild" function in the code archives somewhere. I think MasterBeaker did one called "NextChild" or something... |
| ||
Are you sure you are using LoadAnimMesh, and not LoadMesh? |
| ||
Are you sure you are using LoadAnimMesh, and not LoadMesh? He did say he had no trouble finding the wrists?Anyway, try this. |
| ||
MilkShape doesn't keep Child names or group names. I think they all end up being called "root". It's a pain...It keeps the heirarchy, but not the names. If you have ultimate unwrap, you can edit the names in that. |
| ||
He did say he had no trouble finding the wrists? I was assuming that was another model altogether, since he was talking about loading a gun model (which returned 0 for CountChildren)... |
| ||
I'm stupid! ROFL, you're right Fredborg, I searched the gun for bones but didn't load it as an AnimMesh - thanks :) Another question: Is there another way to get a Milkshape group as a child entity in Blitz than using Ultimate Unwrap to rename the groups? Thx for your help! Kungfista |