OMG I thought this is impossible in UE4 . Been trying this for days and scouring the forums for a solution . Teach me senpai !!
@LongmireLocomotion8 жыл бұрын
The trick is to add a rigid body to the root or reference joint of the character. Then, when simulating physics, simulate all rigid bodies except for the root. For example, the pelvis and below. You will also need to make sure to free all of the linear constraints on the pelvis joint since it is no longer the top of the joint hierarchy. This allows you to blend in and out from physics and an animated state. Also, It would be wise, while simulating physics, to disable the movement component and collision on the capsule, and set its world location to the pelvis location every tick. This makes the capsule (and the reference or root joint, since it is a child of the capsule) follow the ragdoll wherever it goes.
@mansoor66788 жыл бұрын
Thanks for replying . I'm still stuck at the first sentence though . When adding rigid body (cube shaped) to the root and enabling physics on pelvis and below , im still having the character rotated after physics is removed .... is there something im missing ?
@mansoor66788 жыл бұрын
Ok i got the rotation problem fixed , but now another problem i cant seem to fix . After disabling simulate physics on the player mesh , the mesh no longer follows the capsule . The player appears to run in-place while we move only the capsule . Can you tell me how we can fix this ?
@LongmireLocomotion8 жыл бұрын
Hmm. The skeleton should never become fully detached from the capsule. If you add a rigid body to the root, but only simulate physics on the pelvis and above, then the root should always remain at the capsule location, meaning that when you blend back into an animated state, the pelvis should return to the capsule. You would want to disable movement on the capsule when simulating physics and have it follow the pelvis location.
@mansoormanz50438 жыл бұрын
+KingTumTum101 the problem is not there when using rootmotion , which is good in my case since my game employs root motion :) . Now all that remains is removing the jitter on the ragdoll that happens when blending the physics weight value from 1 to 0 .