# Bone animation (Matrix problem)

This topic is 4933 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have a problem white my bone animation, it consists of tow bones and tow boxes, and one box is assigned tow each bone. I have the boxes matrixes these rotates/transforms/scales the object so that it looks as it should. And one array(key frames) of bone matrixes that rotates/transforms the bone. If I just use the boxes matrix the object looks as it should. And if I only use the bones matrix(bone matrix of a specific key frame), to transform the boxes, the animation looks fine, but the object dose not look as it should. So I multiplied these tow matrixes together. And the result is not what I wanted the axes of rotation and translation in the animation gets wrong and the object don't look as it should it also gets the wrong rotation and translation. I am not so good at math when it comes to matrixes, but I am learning. So what do I do to get the object and the animation to look as it should? /Luger

##### Share on other sites
Hi :)

Without having any knowledge towards your code, have you tried switching the multiplication-order? :)
One common mistake is to forget wether you use column-wise or row-wise matrices!

Hope everything works out for ya'

Best regards,
Roquqkie

##### Share on other sites
I don't think that's it, I am using DirectX and the D3DXMatrix.... functions to set up the matrixes and to manipulate them, so I hope the column and row's are handled correctly by those functions.

/Luger

##### Share on other sites
It's not the row and column order he is referring to but the multiplication order of the matrices. When multiplying matices order does matter.

A * B * C is NOT the same as C * B * A

Perhaps you could show us some images?

Cheers

##### Share on other sites
As ernow said, I meant the multiplication-order.

A * B != B * A

Futhermore I also wanted you to be sure that you didn't have to transpose any of your matrices (column-wise to row-wise and vica versa)

Best regards,
Roq

##### Share on other sites
oki, I will try to expline this white som screen/pics I made.

If I just only use the box matrix the box looks as it should.
Like this

And if I use the box bone matrix it looks like this.
Like this

You can see the difference.

Now here is what the animation looks like when I only use the bones matrix to transform the object.
Like this

And here is what I would like it to look like.
Like this

/Luger

1. 1
2. 2
Rutin
19
3. 3
khawk
18
4. 4
5. 5
A4L
11

• 9
• 12
• 16
• 26
• 10
• ### Forum Statistics

• Total Topics
633769
• Total Posts
3013754
×