forked from Mirrors/openclonk
Apply animation mirror to bone translation of all keyframes
parent
1f78d57516
commit
801b10881b
|
@ -195,18 +195,14 @@ namespace
|
|||
void MirrorKeyFrame(StdMeshKeyFrame& frame, const StdMeshTransformation& old_bone_transformation, const StdMeshTransformation& new_inverse_bone_transformation)
|
||||
{
|
||||
// frame was a keyframe of a track for old_bone and was now transplanted to new_bone.
|
||||
|
||||
//frame.Transformation.rotate.x = -frame.Transformation.rotate.x;
|
||||
frame.Transformation.rotate.y = -frame.Transformation.rotate.y;
|
||||
frame.Transformation.rotate.z = -frame.Transformation.rotate.z;
|
||||
|
||||
// We might also want to do something like this... need to get feedback
|
||||
// from modelers...
|
||||
#if 0
|
||||
StdMeshVector d = old_bone_transformation.scale * (old_bone_transformation.rotate * frame.Transformation.translate);
|
||||
//d.x = -d.x;
|
||||
d.x = -d.x;
|
||||
frame.Transformation.translate = new_inverse_bone_transformation.rotate * (new_inverse_bone_transformation.scale * d);
|
||||
#endif
|
||||
|
||||
// TODO: scale
|
||||
}
|
||||
|
||||
bool MirrorName(StdStrBuf& buf)
|
||||
|
|
Loading…
Reference in New Issue