# [HELP] Milkshape3D animation not rotating correctly

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

## Recommended Posts

Hey guys.

I'm trying to follow the Real Soon Now guide to animating a Milkshape3D model. My code seems to be working in that the model is rendering correctly, and the animations seem to be translating the model in the world properly, however no joint is ever rotating. This is confusing me to no end....

I've refactored my code so many times, i've even tried to implement the animation code without following the tutorial, to no luck i always seem to come out with the same issue :(

If anyone could take a look and tell me if i'm doing something super wrong or what, i'd really appreciate that!

My current code:

http://pastebin.com/tdZYbtJh

##### Share on other sites

I had a thought, "Hey, maybe my quaternions are busted!" so i removed the quaternions and changed them to matrices. Same result!

Matrix BuildMatrix(const Vector& rot, const Vector& trans) {
Matrix t = Matrix::Translation(trans.x, trans.y, trans.z);
Matrix x = Matrix::AngleAxisRotation(rot.x, 1.0f, 0.0f, 0.0f);
Matrix y = Matrix::AngleAxisRotation(rot.y, 0.0f, 1.0f, 0.0f);
Matrix z = Matrix::AngleAxisRotation(rot.z, 0.0f, 0.0f, 1.0f);

return t * (x * y * z);
}

Vector ToTranslation(float* f) {
Vector v(f[0], f[1], f[2]);
v.w = 1.0f;
return v;
}

Vector ToRotation(float* f) {
Vector v(f[0], f[1], f[2]);
v.w = 0.0f;
return v;
}


1. 1
2. 2
3. 3
4. 4
Rutin
13
5. 5

• 26
• 10
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633695
• Total Posts
3013374
×