I’m running into a bit of a problem with my character wanting to stand on any kind of flat surface, no matter how tiny it may be.
To illustrate my problem, I have a tiny sliver of a collision box peeking out from underneath another.
Now this particular problem would be a 30 second fix in my 3d program, but there are other things I would also like to make un-walkable.
Like pipes or tree branches that would be too narrow for an actual person to walk on.
It will not allow me to replace or change the root capsule component. I can’t remove the collision from it without having my character fall through the world. It’s the root, it won’t be affected by other bits I attach to it even if those have collision and it falls through the world anyway. Even if I made it a single unit wide, it would still be possible to stand on tiny things if you were on any flat surface, even a tiny edge like the one in the picture, which is easy to get on by jumping toward or falling against an otherwise flat surface that has a tiny edge poking out like that.
I suppose one alternative to changing the character itself is having some kind of pushing volume above my non-walkable surfaces, but that is far from ideal. Or perhaps some crazy system of traces done by the character to detect if there’s a big enough thing to stand on, but that would be a lot of stuff happening every tick.
For objects lying on the floor, I would suggest to disable collisions on them so your character won’t step on them. For pipes and tree branches, I think the easiest would be to extend the height of your collisions meshes to be sure your character cannot jump on them…
Instead of making them massively tall, I suppose an option would be to have a steeply pointed collision mesh above those areas that only affects the pawn, to make sure the walkable slope is too steep to walk on. So the player gets automatically pushed off.
Or maybe adding tags to those meshes I want to push the player off of, have a trace detect what the character is standing on, if it has “no_walk” tags, set the player to falling mode and use another trace or two or three to determine the direction to push the player and then apply some kind of force to the player. Would probably require only one trace to be running all the time and then a few more that could happen once per mesh.
For the other problem of tiny flat edges poking out of places, I wonder if there’s any way to have two stages of collision on the character. One capsule that’s narrow that does the check for the floor area to stand on and another one that’s wider to stop the mesh from going into/through walls, but wouldn’t provide any support for the character in terms of falling down.
You could also just set the “Can Step Up On” flag for the relevant actors/components to “ECB No” which will prevent the player from coming to rest on them… Or use the “Override Default Walkable Slope” value on these objects to set the walkable slope below the slope of the object so that particular slope cannot be walked up.
And that’s exactly what I was looking for. I thought there should have been an easier way of doing that. I can just set the max walkable slope to 0 and have the things go at a fraction of a degree and it pushes the character off nicely. Thanks.