Making character "collision" force based rather than collision based

Wondered if anyone had done this. Right now if a player collides with the capsule of another player, they stop dead. What I want to do is allow some element of pushing or squeezing in a manner akin to TF2, mainly for AI usage, but also so that players can’t block others in doorways etc.

Anyone seen this in UE4 anywhere? I’m sure I saw some checkboxes that seemed to suggest such functionality.

They are a node calling Launch Character

i dont sure but afik there is not out-the-box solution.

You could create a larger capsule, with “overlap” rather than “collide,” and when another character overlaps it, add a force that pushes out, larger the closer the centers of characters are.
You can also keep adding this force inside Tick until you get the end overlap event.

Put all character colliders in a collision channel that doesn’t block itself but does overlap with itself, and write code so that as long as two character colliders are overlapping, they push themselves away from the other character. So basically;

or, if you want to always push along the ground direction when you are grounded, you could do:

etc, etc… it all depends on how exactly you want to handle the pushing logic

Yeah, I just wondered if anything like that already existed. Apparently not.

I really don’t think this should be built-in into the engine, because it’s way too game-specific and it can be implemented in an infinite amount of different ways, depending on what you want for your game

Hmm, there’s plenty of other things in there that are pretty game specific, but its not a huge deal, I’ll do it myself, just wondered if there wasn’t already a checkbox of some sort. There usually is for UE :slight_smile:

Ha, you’re actually right about that. I can live with it, but it’s pretty much my only gripe with the engine. Because more often than not, I think these things just cause more clutter than they are helpful