Im trying to use CustomGravity in GASP. I’m new to Unreal Engine, the first problem that occurred was that the character’s upper body remained perpendicular to the Z-axis. I found that the problem is caused by the OffsetRootBone node, while using the Accumulate mode, I use the Transform (Modify) Bone node to perform root bone rotation repair. It seems that PoseSearchSchema Trajectory Channel does not support custom gravity unnormal axis.Did I overlook something, or do I need to customize it
I don’t know what happened, but I messed around and came up with a formula that seems to be correct.
FVector BoneDelta = AnimInstance->GetOwningActor()->GetActorTransform().GetRelativeTransform(SearchContext.GetWorldBoneTransformAtTime(SampleTimeOffset, SampleRole, SchemaBoneIdx)).InverseTransformVector(BonePosition);
float t = BoneDelta.X;
BoneDelta.X = -BoneDelta.Y;
BoneDelta.Y = t;