I want to implement sliding doors in my game, but I have a problem, when a character (Either NPC or player) stands in the open door as it closes, the door just clips trough it or teleports the character to the side.
I’m trying to figure out how to detect if there is something in the way and deal damage to it or open the door back again.
The simplest option would be a small collision box at the end of the door, but unfortunately this would trigger even if there is space for the door to move. If there is space to push the character, push it, but if there isn’t, kill it, but I don’t know how to properly check for space, considering my NPCs are all of different sizes.
Forgot to mention that those collisions ignore everything, except overlap pawn capsule (capsule component). This setup only allows the character capsule to trigger the overlaps.
I added a custom collision object channel in project settings for the pawns capsule component. This separates the mesh from the movement aspects.