control bones from inside a mesh?

Blitz3D Forums/Blitz3D Beginners Area/control bones from inside a mesh?

chwaga(Posted 2007) [#1]
could i attach objects individually to mesh sub-objects? (like attach hat to the bone bipe_head01 from inside a mesh, bipe_head01 is an object inside the mesh, but not a blitz3d entity)


b32(Posted 2007) [#2]
Yes, you could use FindChild to retreive the subobject.
For FindChild, you need to know the exact name of the bone.
In the case of the 'bipe_head01' bone use ie:
bone = FindChild("bipe_head01")
EntityParent hat, bone


There is also the command GetChild, which uses an index parameter instead. It is handy to scan the object for any child objects. Best is to use it in a recursive function, that also checks each child for any children of its own:



jfk EO-11110(Posted 2007) [#3]
I think EntityClass$() may also be useful, it should return "Pivot" when it's a bone.