Character Movement and Collision

Hello,

I have some attack animations in my game that use Root Motion. The issue I’m having is that when the player goes to attack a monster, the root motion slides against the monster’s collision capsule, making it feel really un-natural and awkward to play. Having to constantly re-position yourself to face the monster makes the gameplay and combat seem very off.

Here is what is happening: TestRMAnimSlide GIF | Gfycat
Notice how the character slides along the collision capsule as the root motion is pushing the character forward.

Here is an example from the game TERA and is exactly what I’m trying to replicate: Tera 2019.09.09 - 05.32.08.07 GIF | Gfycat
Notice how the character doesn’t move even though the root motion is pushing the character forward, I don’t move until the monster is dead.

I’ve tried with box collision instead of capsules, but the same thing happens, just like it does running into walls.

Does anyone have any suggestions on how to fix this?

Thanks.

Yeah the obvious reason is you’re pushing your character forward with every attack, regardless of what’s in front of it.
Just check if the player is colliding into an enemy, then stop the forward movement for that attack while they are.

Thanks for the reply.

I was hoping to not have to use something like this as I can see it being a bit buggy. I would have to back-peddle out of the collision to be able to move again, which feels just as weird as the problem I have now.

As you can see in this random video I found online: Dropbox - CollisionIssue.webm - Simplify your life this is basically what I want. It seems by their posts that there is no logic behind it at all. I was wondering if anyone knew of a way to get this effect without logic. Especially in the CharacterMovementComponent, there is a function called SlideAlongSurface which is called in the movement logic, and was hoping for a way to just disable this without editing engine source code.

1 Like