Ragdoll and hkaRagdollPoweredConstraintController issues

Ragdoll and hkaRagdollPoweredConstraintController issues

Hello everyone,

I'm having a problem with my ragdoll simulation. I'm following as an example animations showcase demo, so far I have implemented successfully all the ragdoll initialization part and ragdoll driving to animation with support of hit reactions. I've also kinda got standard ragdoll scenario to work, but only  by not using the hkaRagdollPoweredConstraintController. Please check the included video to observe what happens, any ideas on what could cause this ragdoll "freezing" are more then appreciated. If more details are in order, just let me know. Below is a code snippet and a mentioned video.

void cHkRagdollAnimations::UpdateRagdollToMatchAnimation(hkaPose& pose, float dt)
    // Get the ragdoll's reference pose in model space
    // We use this pose as the in+out pose to the mapper below
    const hkaSkeleton* rSkel = m_ragdollInstance->getSkeleton();
    hkLocalBuffer<hkQsTransform> ragdollModelSpace( rSkel->m_bones.getSize() );
    hkaSkeletonUtils::transformLocalPoseToModelPose( rSkel->m_bones.getSize(), rSkel->m_parentIndices.begin(), rSkel->m_referencePose.begin(), ragdollModelSpace.begin() );
    // Map the pose from the animation (highres) to ragdoll (lowres)
    m_highResToRagdollMapper->mapPose( pose.getSyncedPoseModelSpace().begin(), rSkel->m_referencePose.begin(), ragdollModelSpace.begin(), hkaSkeletonMapper::CURRENT_POSE );
//with this block commented out, the ragdoll works   
        // Drive the powered constraints to this ragdoll pose using a controller
            hkLocalBuffer<hkQsTransform> ragdollLocalSpace( rSkel->m_bones.getSize() );
            hkaSkeletonUtils::transformModelPoseToLocalPose( rSkel->m_bones.getSize(), rSkel->m_parentIndices.begin(), ragdollModelSpace.begin(), ragdollLocalSpace.begin() );
            hkaRagdollPoweredConstraintController::driveToPose( m_ragdollInstance, ragdollLocalSpace.begin() ) ;
    // Get the current pose from the ragdoll, map it back to the character
        m_ragdollInstance->getPoseModelSpace(ragdollModelSpace.begin(), m_currentTransform);
        const hkQsTransform* localBIn  = pose.getSyncedPoseLocalSpace().begin();
        hkQsTransform*       modelBOut = pose.accessSyncedPoseModelSpace().begin();
        m_ragdollToHighResMapper->mapPose( ragdollModelSpace.begin(), localBIn, modelBOut, hkaSkeletonMapper::CURRENT_POSE );

And btw, yes, I could live with this what I already got, but I want to also implement getting up from ragdoll, so I need to be able to drive ragdoll to a specific pose :)

Thx in advance!

2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

Hmm, seems I can't edit my post, so here's the missing video link:


Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen