Remove Mesh from Character

Hello, does anybody know an easy way to remove from the Character class, because I want a Character who is just a Camera. I could give a Pawn or DefaultPawn a CharacterMovement component but I’d prefer to remove the Mesh somehow.

Here is what you need

(const FObjectInitializer& ObjectInitializer): Super(ObjectInitializer.DoNotCreateDefaultSubobject(ACharacter::MeshComponentName))
1 Like

Where would you need to put this code in the project? the ASomeCharacter.h file, ASomeCharacter.cpp file, within the class, outside the class? p.s. thanks for some insight into using DoNotCreateDefaultSuboject.

In cpp file (Constructor definition)

ASomeCharacter::ASomeCharacter(const FObjectInitializer& ObjectInitializer): Super(ObjectInitializer.DoNotCreateDefaultSubobject(ACharacter::MeshComponentName))
1 Like