I’m in a multiplayer design with UE5.0. I found it’s so exaggerated for the collision between 2 players. While red player is walking towards yellow player and his body(capsule or mesh?) is touching yellow player’s body, yellow player will be hit several meters away. It looks unrealistic. Does anybody know why?
I tried to use several static pictures to show this process as below.
Hey there @walemmlis! Generally the character automatic de-penetration doesn’t launch the other character like that. Usually it de-penetrates a couple of centimeters without force. Now the character controllers also have a physics interaction control center but since the player controller capsules are basically kinematic and fully controlled via code not the physics system.
Does your gun have collision? If so, try disabling that completely for a moment and then testing again. If the launching still occurs we’ll look down another avenue.
Aside from the gun this is the base third person right? No other possible affectors?
This character is migrated from LyraStarterGame project in MarketPlace.
In order to let the weapon bullet to hit directly on the skeletal mesh instead of capsule, I added one customized object type “PawnCapsule” and applied it to Caupsule component as illustrated below. Trace response was set to ignore both Visibility and Camera.
If I switched back to its original setting by using collision preset Pawn for Capsule as illustrated below. Then, I can’t reproduce this problem any more.
Ahhhh It’s possible that the character movement component is hardcoded to check for pawn collision type and then ignore it when calculating interaction. Still it’s odd because it’s supposed to sweep before it moves into things, so it could just be only forcing in (to be able to move physics objects). I’ve never looked too deeply at it myself. Opening Visual Studio now to take a look.
Edit: From my dive into the source, I see the bumping function does a little something in the case of if it derives a pawn class, but it doesn’t check collision type to do that it checks the class directly. Does it still occur if physics interaction is disabled on one or both of the pawns? This will help narrow down if it’s an internal function or not.
If it’s query only it’s definitely programmatic. Determining where is going to be the issue, I’ve been struggling to recreate your issue even with the Lyra character classes. Let’s compare test environments. Is this in a multiplayer listen server environment with both connected or is this another pawn with no controller attached, or AI pawn?
Yes. This is in a multiplayer listen server with both connected. Both players(red and yellow) are using the same character blueprint in which the skeletal mesh is from LyraStarterGame project.
I’m trying to dig around and see what I can find but not coming up with much. Hrm, the SKMs don’t have collisions applied right? On your character movement component is the checkmark EnablePhysicsInteraction checked?
@jigoku , Thanks for your reply!
The weapon in my character is a skeletal mesh instead of static mesh. I didn’t find where to remove the collision for a skeletal mesh. Could you give me more details?
The SKM collision is set to a preset “CharacterMesh” in which collision is enabled with Query Only. Please see the picture below.
I added a Skeletal Mesh weapon and didn’t reproduce your problem, sorry, I don’t know how to solve your problem, what about your other yellow-skinned character’s weapon collision?