Page 1 of 1

ParentSkeleton() important tip! Update the bone matrix

Posted: Sun Jul 19, 2009 12:39 am
by heyvern
Good grief. It took me ages to figure this out.

When accessing the skeleton of the selected layer you would use:

Code: Select all

moho:Skeleton()
When you want to access the bones in the parent skeleton of a sub layer you would use:

Code: Select all

moho:ParentSkeleton()
Now you move bones around with your script and want to update everything:

Code: Select all

moho:Skeleton():UpdateBoneMatrix()
Oops! This doesn't update the PARENT SKELETON! To do that you need an additional update:

Code: Select all

moho:ParentSkeleton():UpdateBoneMatrix()
This may be obvious to many of you... but it had me pulling out what's left of my hair trying to figure out why the script wasn't working. ;)

-vern