The interaction of the physics of the door and the player

Hello!
I switched from Unity to UE5, and ran into an unpleasant physics problem.
I have an almost basic Character Controller, modified only for opening doors, and the door itself, which is opened via SetRelativeRotation.
The problem is that when the player stands and opens the door, she interacts with him extremely poorly, pushes through, and teleports him. If the player is on the move, then everything is fine.
I have not found any guides on this topic, and I have extremely weak skills in such a different engine, so I ask for help …
Link to a demonstration of the problem and settings:UE5 Door bug

Typically when opening a door, you’ll use something like a timeline that drives the orientation of the door as an animation.
I don’t understand what “modified the character controller to open doors” means. The character movement controller is about updating the character position based on simulation and input. Opening doors is about the door actor, and the interaction with the world, so this is typically something your player controller and your door actor will implement, not the character.

However, if you drive the animation as just an animation, it will be “kinematic,” which means that it won’t interact well with physics. Similarly, the default Character in unreal believes that it is (mostly) kinematic, and thus won’t be pushed around by physics objects. Unstoppable force, meet immovable object!

To solve this problem, you have to figure out what you actually want to happen in this case. Most physics based solutions are actually pretty bad (this is why “don’t put doors in your game” is real, honest, realistic game developer advice!)
The least bad option is typically to detect that the character will be in the path of the door, and make (and play) an animation that moves the character out of the way when opening the door.
There are some nice articles on the internet about the MANY MONTHS of character animation and inverse kinematics work needed to make character/door interaction actually be realistic in some AAA game (I forget which one,) and the conclusion of the article was “probably not worth all the time and effort.”

Another option is sliding doors.

unpleasant physics problem

You’d need to decide whether you want a Physically Accurate interaction or Set Relative Rotation. Combining both may yield undesirable results, as you’ve observed. Ignore the shooting / directional nature of it, but do note the setup:

If I wanted to pry the door open, I’d try it like so in the player controller:

We apply actual physical force to the door:

It should play nicely with the player’s capsule interaction (just moving forward) since the Character Movement Component understands physics:

Which can be further tuned in the character (or, to a lesser extent, in the door itself):

And if the door must push the player away, it can apply extra force back at the player, and the CMC will respect that (to an extent).


The problem is that when the player stands and opens the door, she interacts with him extremely poorly, pushes through, and teleports him. If the player is on the move, then everything is fine. I have not found any guides on this topic

This, again, stems from mixing 2 movement methods. Setting Rotation may attempt to force geometry intersection. The character has a de-penetration mechanism that will cause displacement in case the collision capsule gets stuck. You could try Adding Rotation instead which may work better but then again, it’s unclear whether you want this or the actual interaction of physics mentioned in the title.