Component created in OnComponentCreated rotated?

I have an actor with a component hierarchy like this:

  • UStaticMeshComponent
    • USceneComponent
      • UCapsuleComponent

The USceneComponent is a custom C++ class that creates the UCapsuleComponent from its overriden OnComponentCreated function

The odd thing is that when I create this, the capsule doesn’t have the correct rotation. The USceneComponent is rotated relative to the mesh, but the capsule appears to have no rotation.

But if I close and re-open the BP Editor, the capsule is rotated correctly.

Am I missing a call or something? It is registered and attached to the USceneComponent, and behaves correctly in all other regards. It just doesn’t have the right rotation when first created…

I’m starting to think OnComponentCreated is the wrong place to create the capsule sub-component. But as per this post, and this link, there are tons of pitfalls when creating sub-components outside of the constructor…

I have properties in the scene component that I want to use when creating the capsule component. These are properties that can be updated in the editor. Can anyone think of maybe some example code I could dig through to find a similar setup…?