How to stop capsule from rotating during motion warping?

My character capsule is rotated when motion warping finishes, it doesnt happen all the time. but happens frequently, initially i thought capsules are colliding with each other, but that doesnt seem to be the case.
I am not sure what is the issue, my animation itself is perfectly fine, i also tried to lock capsule rotation, controller rotation are turned off aswell.

Any help is appreciated.

Thanks

	GetCapsuleComponent()->BodyInstance.bLockXRotation = true;
	GetCapsuleComponent()->BodyInstance.bLockYRotation = true;
	GetCapsuleComponent()->BodyInstance.bLockZRotation = true;
	GetCapsuleComponent()->SetSimulatePhysics(false);

	bUseControllerRotationPitch = false;
	bUseControllerRotationYaw = false;
	bUseControllerRotationRoll = false;

Hard question to answer with out the scene files but I’ll take a guess.

My guess is that you are using root motion rather than in place as the capsule is glued to the root bone of the character. If the root bone is rotated in this manner then the capsule will follow.

hey thanks for reply, the animation has root motion enable since its required for motion warping, but there is no rotation in animation that appears as in this image. let me know if you need anything else i would be happy to provide the information. just to add on to info, this is top down game, with point and click as input using navmesh. i also tried to move the target manually through code instead of motion warping still similar issue. now i am not sure if this post belongs to this topic. :frowning:

Update, i was not able to solve it when using motion warp, instead i rewrote the code to manually lerp the actor to destination while animation. This is not the correct answer but it fixes my issue.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.