lingling
(lingling)
May 20, 2016, 9:05am
1
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();
…
lingling
(lingling)
June 13, 2016, 8:42am
2
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->AddImpulse(impulse, true);
c->AddTorque(Torque, true, true);
}
Is there any progress? As I understand you want to do something similar to the gta/rdr level?