Download

Character with physical animation jitters when attached to a vehicle

I suppose I have found the reason, but I can’t find the solution.

During USkeletalMeshComponent::EndPhysicsTickComponent, the vehicle call SyncComponentToRBPhysics to sync component transform and its chidlren’s.
In the same function, the character call BlendInPhysics to blend physical computation results and animation transform to generate new transform.
Therefore, it matters whether the vehicle executes EndPhysicsTick first or the character does, the character’s transform woulde be different in each situation after each tick.

I think adding prerequisites to the character’s USkeletalMeshComponent::EndPhysicsTickFunction is a solution, but this member is private that I can’t access.
Do you have any ideas?
Thank you in advance.
[video]https://youtu.be/2ZA1ylRzlhY[/video]

Well. I have figured it out. The reason is exactly what I have metioned.
My solution is to ensure that the character is created after the car. Thus the car’s EndPhysicsTickFunction registers first and ticks first.
Hope UE4 officials could solve it such as adding prerequisites when attached to other component. That solution is more beautiful.

I do not have this issue but I’m just grateful to see that you posted your solution, this could come in handy one day. Keep it up!