i have a c++ class that inherits from character.
in the code, i’m setting the mesh of the skeletal mesh component (an additional one, not the one from Character)
however, the mesh itself never seems to appear ingame.
i’ve set what the mesh should be from the editor, but in the gameview, it’s not rendering.
i’m following https://docs.unrealengine.com/latest/INT/Programming/Tutorials/Components/1/index.html with the only difference being that i’m using a skeletal mesh instead of a static one, so i don’t see why it’s not working.
in the .h file
UPROPERTY(EditAnywhere)
USkeletalMesh *objmesh; //the mesh
UPROPERTY()
USkeletalMeshComponent *meshComp; //the mesh renderer
in the cpp file
ABaseCharacter::ABaseCharacter()
{
// Set this character to call Tick() every frame. You can turn this off to improve performance if you don’t need it.
PrimaryActorTick.bCanEverTick = true;
meshComp = CreateDefaultSubobject(FName(“SkeletalMesh”));
meshComp->AttachTo(RootComponent);
meshComp->SetSkeletalMesh(objmesh);
meshComp->SetRelativeLocation(FVector(0.0f, 0.0f, 0.0f));
meshComp->SetWorldScale3D(FVector(1,1,1));
}