Prevent Player From Jumping on a Mesh

I am working on a game and I have a mesh that I use to block hallways and prevent the player from going that direction. They are placed vertically with slight angles. I’m having a problem that the player can jump up on these. The player needs to be on the ground all the time otherwise they will be able to avoid dying indefinitely. I have tried moving and rotating and no matter how its placed I can always seem to jump on it. I want to avoid adding more to the scene then what is necessary so I don’t want to add another mesh or extra collision of some kind just to keep the player away from those points as that mesh already has collision. Unless it turns out that is actually a good way to handle this.

Is there a way I can prevent the player from jumping on these items? Or is there some other way I can handle if the player does jump up on them. Like maybe start damaging the player after a few seconds until they get down? What is a proper way of handling this?

Well, as you mentioned in your comment, the player doesn’t have to jump at all during the rest of your game. That means that the jumping capability is somewhat unnecessary. However, I would think twice about removing it, since players are so used to it that they might feel alienated when they find out they can’t jump. Game design psychology :wink:

Instead, try to replace open hellways with doors or other “natural” blockades. This will lead the player in a single direction while also giving the impression of a larger area, if that is what you want to achieve.

What I don’t quite understand is why the walls have to be at an angle. Is this absolutely required? I ask this because if you are having issues with the player jumping on the collider because the mesh and collider are slanted, don’t match the collider to the mesh and instead just make a vertical wall. If the player can jump on that, you did something very wrong in your code.