Greetings,
We believe there is a bug when using Root Motion (via AnimMontage) on mobile where the collision cylinder of pawns lags behind. I will show you a video where we have a sample unit moving around in PIE (working as inteded), and then another footage of the same scene but on Galaxy S4 (Android) so that you see the problem.
Correct Behavior: - YouTube
Wrong Behavior: - YouTube
I’m not sure if this issue is fixed in 4.6, as we are using 4.5, but we thought it’s better to report it now rather than wait.
Thanks for any help!
Hello Hamad.Empire,
I have a few quick questions for you to help narrow down the issue that you are experiencing.
Quick questions:
- Does this occur with any other assets (“units”) that you are using?
- If the “unit” stops in the animation does the capsule catch up?
- Is the capsule in the correct position when not animating?
- I know that you have tried this in the editor window but have you tried it in the mobile preview?
We do have the answers, but we believe now that this could be on us as there is some code moving our skeletalmesh component around. I will get back to you as soon as we make sure 100% that it’s not on us.
Hello Hamad.Empire,
I understand, if you require further assistance on this matter feel free to post a reply and I will be more than happy to help.
Make it a great day
In BeginPlay(), we have some code to properly position the collision cylinder without having other team devs to manually adjust it, since we have lots of unique characters in our game.
I define an FVector, to store in it the relative location for the cynlinder. Then I modify it’s z component right away (which is what we need). Something like this:
FVector RelLoc;
RelLoc.Z = /* calculations bla bla bla */
This works just fine on PC, however on mobile it doesn’t. What we did to finally resolve this is to initialize RelLoc’s XYZ components all to zeroes. Then it worked.
Sorry for the false alarm!