Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

129 Neutral

About judeclarke

  • Rank

Personal Information

  • Interests
  1. judeclarke

    Blending two animations

    I took a break from this as I kept having the same issue. From what I gather, this would be the correct way to blend two animations? The issue I am running into is that the bone positioning appears to be off so I wanted to check if the algorithm is correct Matrix4x4 transforma = animationa->GetFinalTransforms()[i]; Matrix4x4 transformb = animationb->GetFinalTransforms()[i]; float amount = 0.5f; Vector3 translationa(transforma._41, transforma._42, transforma._43); Vector3 translationb(transformb._41, transformb._42, transformb._43); Vector3 lerped = Vec3Lerp(translationa, translationb, amount); finaltransforms[i].Identity(); Quaternion rotationa(transforma); Quaternion rotationb(transformb); Quaternion slerped = QuaternionSlerp(rotationa, rotationb, amount); finaltransforms[i].Translate(lerped); finaltransforms[i].RotateByQuaternion(slerped);
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!