Download

Directly modify joints in code for Procedural Animations

Hello,

I want to do full procedural animations (walking, self-balancing, etc) on a character ragdoll.

So I need to be able to access and directly modify the joints. I have been searching the documentation but I am not sure what is the best way to do this.

Thanks

void AMyProject3Character::Tick(float DeltaTime)
{
USkeletalMeshComponent * skel = GetMesh();

After some testing, I modify the bodies of the skeletal mesh using the code below. I would be curious what others are using.

Some pseudo code (doesn’t compile)
USkeletalMeshComponent * skel = GetMesh();
FName boneName;
for (int i = 0; i < skel->Bodies.Num(); i++)
{
int16 boneIndex = c->InstanceBoneIndex;
boneName = skel->GetBoneName(boneIndex);
skel->GetCurrentJointAngles(boneName, angleX, angleY, angleZ);

    //Skipping the procedural animation code
    CalculateTorqueAndImpulse(...);


c-&gt;AddImpulse(impulse, true);
    c-&gt;AddTorque(Torque, true, true);

}

Is there any progress? As I understand you want to do something similar to the gta/rdr level?