How do I access a specific transform (or bone) in a figure hiearchy.
Is there some sort of structure like
figure.hip.leg?
What if I have two figures that have the same structure.
How would I access the legs of each one?
Thanks,
Dan
How do I access a specific transform (or bone) in a figure hiearchy.
Is there some sort of structure like
figure.hip.leg?
What if I have two figures that have the same structure.
How would I access the legs of each one?
Thanks,
Dan
transform.Find(“figure/hip/leg”) would return the corresponding transform
Is there an easy way to get these paths for every bone?
for (var child : Transform in transform) {
and then search for parents in a loop until there are no more?
}
Is there an easier way?
thanks,
Dan
You could keep a reference of the whole bone structure.
And Probally write some assets importer/preprocessor, to set them up for you.
If you have the same naming scheme, than this should be fine.
Otherwise you will have to come up with some regex, or guess work on what belongs where.
For unnamed bone setups, you might calculate the distance from the bone to the root bone + some hierachy information(heuristics).
If it’s easier, that depends on how many characters you have to find the bones of.
And if you lean more into code or art.