**Physics collision ignores Capsule Collision, When Skeletal mesh root bone orientation is rotated in the Z-Axis, resulting in unexpected collision behavior.  


Screen shot has been attached to demonstrate:  [Image Removed]

Steps to Reproduce

Blank Project has been attached for Easier Replication.

1. Create a new C++ Third-Person project with no starter content.

2. Delete the Begin Play start base and the Third Person Character from the map.

3. Create a C++ class "MyPawn"  that derives from a Pawn and implement the Pawn's movement and the debug display (Separate code file has been attached in .Cpp, and .H file)

4. Create a Blueprint class deriving from "MyPawn" C++ class. "BP_Pawn". 

5. Inside of "Bp_Pawn" add a Skeletal Mesh component as the root component, set the collision presets to "pawn" and enable collision. 

6. Add a Spring Arm Component with a Camera Child to the Blueprint.  and modify the following values:

Spring Arm Rotation: Y: -30

Camera: Location: X: -250, Y: 0 , Z: 170

Rotation: X: 0, Y:-20, Z: 0

7. Add a floating Pawn Movement.

8.  Duplicate the SK_Mannequin_PhysicsAsset. Delete all collisions. Click root node and add Body(Capsule Collision). Set the resulting capsule as in CollisionIssue.uproject by tweaking the body setup section in the detail tab. 

Center:  X: 0 , Y: 0.0,  Z: 150

Rotation: X: 0,  Y: 90 , Z: 90

Radius: 20

Length: 150

Rest Offset: 0

Contribute to Mass:  Checked to True

9.  Duplicate ThirdPersonIdle animation. Export it to fbx. Import it to 3dsmax. Add a 90° root bone rotation around Z axis. Import it back to UE4. 

10.  Create a new Animation Blueprint. Drag and drop the animation created on step 8 in the anim graph and plug it as the final pose.

11.  Set the skeletal mesh component with SK_Mannequin and animation BP created on step 9.

12.  Set the SK_Mannequin mesh's physics to the physics asset created at step 7.

13.  Instantiate the Pawn Blueprint created at step 4 in the map in front of a collision and observe. 

Result: pawn cannot enter the corridor whereas it should. The collision capsule orientation in physics collision solver is incorrect. It ignores the skeletal mesh root bone orientation. Note that the debug display shows the correct capsule orientation.

Expected: The pawn should enter the corridor. The physics collision should be consistent with the debug display and skeletal mesh root bone orientation.

Note: User states that the rotation added artificially on step 8, is actually required in their project. This rotation is automatically added as they import the animation from 3DSmax to UE4,

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-67837 in the post.

Login to Vote

Affects Versions4.204.21
Target Fix4.26
CreatedDec 20, 2018
UpdatedMar 3, 2020
Pull Requests
6426 - Kalmalyzer