Another Request

Blitz3D Forums/Blitz3D Programming/Another Request

Clarks(Posted 2004) [#1]
It would surely be nice to have commands that counts the number of joints or limbs a model just like the count child command. But this one will be different because it will be returning the number of joints or limbs. It will also be great to have commands that will enable BB users to retrieve joints or limbs angles and positions. This can be useful if a model has more than one joint. Its just a request and it will surely make things easier for me and alot of people. Just imagine having a complex model in a game and you know exactly where its feet,hands,head,waist and any other parts of its body are positioned all at once. I mean would it be great. Anyway its just a request please people, no flame wars.


Zethrax(Posted 2004) [#2]
I'm not necessarily disagreeing with you as I may not fully understand what you're suggesting, but aren't the model joints and limbs actually bones, which are just Blitz pivots, which are children of the model entity.

You should be able to use FindChild to identify which bone is which, assuming entitynames have been assigned to identify the individual bones. Once you have the entity handles for the bones you can then use the standard entity position and rotation commands to get and set the attributes of the bones.


Clarks(Posted 2004) [#3]
What you are saying Axeman is exactly right. I guess it probably heavily depends on the the product that you're using. But what im saying is that for some strange reason is if i was to load a character in BB with two bones, BB only counts 1 child which is the main child. I wouldnt even count the 2 child. It must really depend on the product that you're using. But i will experiment and see.


Rob(Posted 2004) [#4]
This is because they are a child of that child. You need to look deeper into the hierarchy. Sometimes there is a dummy child, and the rest are children of that.


Gabriel(Posted 2004) [#5]
There's code in the code archives which will display the hierarchy of a b3d to any number of levels. I'd find it for you, but the regorganisation of the code archives leaves me unable to find anything lately.

Personally I tend to use FindChild, which skips through all the children regardless of the hierarchy.


Clarks(Posted 2004) [#6]
Thanks for the help. Findchild is the command to use.