Download

USkinnedMeshComponent :: USceneComponent conversion ?

Pretty new to C++ in general but is there a way to convert USceneComponent to USkinnedMeshComponent ?
Or how do I use ComputeSkinnedPositions() ?

USceneComponent* actorRoot = GetOwner()->GetRootComponent();
USkinnedMeshComponent SK_actorRoot = USkinnedMeshComponent::USceneComponent(actorRoot);
SK_actorRoot->ComputeSkinnedPositions();

Try this:

auto actorRoot = Cast<USkinnedMeshComponent>(GetOwner()->GetRootComponent());
if (actorRoot)
    actorRoot->ComputeSkinnedPositions();