As the title says, I have a problem with my existing prone system. Basically, while my character is prone, the character mesh can go through a wall. I know and expected this to happen because of how Unreal’s collision management works with characters (since it only goes by the collision capsule unless you want a complete mess), but I was wondering if anyone had any ideas for how to prevent the character from doing so, while simultaneously treating this collision as the capsule would (i.e. if you’re up against the wall, but moving diagonally, it will slide slowly against the wall).
I have a couple of ideas prototyped in Blueprints, one of those being to allow the developer using my framework to add box components around the mesh with a “-checkprone” tag, and to stop up movement input completely should one of those boxes hit, but A) that’s not the most elegant solution for what is to be a very AAA-level framework, and B) camera rotation becomes very frustrating to deal with if the pawn is also supposed to rotate with the camera (although this issue could probably easily be dealt with just by switching some booleans).
If you have any ideas I will happily take them into consideration. Feel free to send Blueprints as well and I will do my best to translate them to C++ (which is what I have been doing so far).
Note in the image above: I do have the collision sizing working for the capsule, so when I use the prone function it does indeed shrink as needed. This is just an example with a fixed prone animation because with that function it does the same thing.
You can use sphere traces/ capsule traces to block movement input in certain directions, and also to check if a given area is suitable to enter the prone state.
Perhaps this video can help you out.
You can spawn an additional collision shape with the same collision setup as the capsule. The additional shape should lie flat on the ground and grow up to the size that is the character + legs, arms etc.
I keep forgetting how exactly the collision is handled by external systems as currently I have tons of other stuff to look at. About a month ago I ran into a situation with UE5.2 which I attempt to remember correctly. My collision was not working properly on a seemingly simple asset (pawn with custom simplified movement component) which moved through walls. What (I think) I found was that the collision component has to be the root component of a pawn, and did not work with a complex collision, say, if the pawn used a static mesh with its own collision, it would pass through walls regardless of the collision setup and collision settings. What is supported, is to use a simple collision such as capsule just like unreal’s example character does.
This situation leaves the original question of this topic without answer (and makes my previous comment invalid). In physics situations however, I had been able to use a characters complex collision in old projects back on UE4. It gets a bit complex and certainly tangled in certain engine systems their code.