sheb

02-23-2005, 11:07 AM

Hello people!

Im stuck once again! I have a chain of bones - now i want to apply the xrotation of one bone to another. I managed to get the whole rotation by

multiplying both objects with their inverse parent transform

set the rotation and transform back (again with the parents transform)

r = $bone02.transform*inverse ($bone01.transform)

t = $bone03.transform*inverse ($bone02.transform)

t[1] = r[1]

--it works ifi set all three

--t[2] = r[2] --$bone03.transform[2]

--t[3] = r[3] --$bone03.transform[3]

t = t*$bone02.transform

orthogonalize t

$bone03.transform = t

however if i try to set only one part of the rotation the object gets skewed. I can orthogonalize its matrix but then the rotation isnt right anymore :/

Any help as always greatly appreciated!

seb

Im stuck once again! I have a chain of bones - now i want to apply the xrotation of one bone to another. I managed to get the whole rotation by

multiplying both objects with their inverse parent transform

set the rotation and transform back (again with the parents transform)

r = $bone02.transform*inverse ($bone01.transform)

t = $bone03.transform*inverse ($bone02.transform)

t[1] = r[1]

--it works ifi set all three

--t[2] = r[2] --$bone03.transform[2]

--t[3] = r[3] --$bone03.transform[3]

t = t*$bone02.transform

orthogonalize t

$bone03.transform = t

however if i try to set only one part of the rotation the object gets skewed. I can orthogonalize its matrix but then the rotation isnt right anymore :/

Any help as always greatly appreciated!

seb