Skip to content

Reset bone location and rotation may cause trouble when switching between skeleton LODs #44

@ZP-Z

Description

@ZP-Z
//@struct FKawaiiPhysicsModifyBone
void UpdatePoseTranform(const FBoneContainer& BoneContainer, FCSPose<FCompactPose>& Pose)
{
	auto CompactPoseIndex = BoneRef.GetCompactPoseIndex(BoneContainer);
	if (CompactPoseIndex < 0)
	{
		PoseLocation = FVector::ZeroVector;
		PoseRotation = FQuat::Identity;
		PoseScale = FVector::OneVector;
		return;
	}

	auto ComponentSpaceTransform = Pose.GetComponentSpaceTransform(CompactPoseIndex);
	PoseLocation = ComponentSpaceTransform.GetLocation();
	PoseRotation = ComponentSpaceTransform.GetRotation();
	PoseScale = ComponentSpaceTransform.GetScale3D();
}

Bone motion is too large when switching LOD.
When CompactPoseIndex < 0, maybe just keeping the information saved before works well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions