How do I change what is the RootComponent in a character (from Capsule to Mesh)?

Hi, I’d like to know how to change what’s the RootComponent in a character (I mean the component marked as “[ROOT]” in the Blueprint). If there’s a way to do it in Blueprint or in editor better, but it’s OK if it’s only possible in C++.

The reason I want to make this is to make the SkeletalMeshComponent of the character be the main and true dealer of character collisions, not the current and default “[ROOT] CapsuleComponent”.

Until now I’ve tried adding this line in my character subclass’ constructor, which compiled fine but with no evident effect in editor or in the blueprint (the CapsuleComponent is still marked as “[ROOT]”), so maybe there’s overriding going on preventing the line to make the change effect (but possibly in the engine code files or blueprints, as I haven’t touched RootComponent in any other place than in this line).

//Mesh is the name of the SkeletalMeshComponent in the character
RootComponent = Mesh

In the constructor of Character.cpp, it can be seen that there’s this line:

	RootComponent = CapsuleComponent;

The problem, though, shouldn’t be here; in my custom subclass of Character the value of RootComponent at the constructor should be overriden to be Mesh (as show above) and not be CapsuleComponent anymore; this change never happens, though.

I’ve tried this too in constructor which compiles as well but makes no effect (in the blueprint the capsule is still marked as ROOT):

 SetRootComponent(Mesh);