I am using GetHitResultUnderCursor function to retrieve actors under the mouse , but I cant seem to detect mesh components when they are a child of an actor , I especially want to get the poseablemesh component here for what I am working on.
Had to get the components array and type cast the components to get my poseablemeshcomponent.
I am using this to rotate bones of a skeletal mesh through code.
myActor->GetComponents(myarray);
for (int i = 0; i < myarray.Num(); i++)
{
UPoseableMeshComponent* myComp;
myComp = Cast<UPoseableMeshComponent> (myarray[i]);
if (myComp)
{
myComp->SetBoneRotationByName("Rotat_axis",FRotator(90,0,0),EBoneSpaces::ComponentSpace);
}
}