Hi, have issue with the motion controller actors not showing up.
the controller was working following previous lesson, laser beam pointer and teleporting all OK.
However when trying to use a new C++ class of Actor as the HandControllers using a child blueprint, it does not spawn. not visible in the World Outliner.
Could anyone help to shine some light into the issue?
using UE4.27 + ms VS 2019. Compiling no errors.
not sure if it is because the SetHand function for left and right is problematic?
in HandController.h, I have
public:
void SetHand(EControllerHand Hand);
and in HandController.cpp
void AHandController::SetHand(EControllerHand Hand)
{
MotionController->SetTrackingSource(Hand);
}
in VRCharacter.cpp
LeftController = GetWorld()->SpawnActor<AHandController>(HandControllerClass);
if (LeftController != nullptr)
{
LeftController->AttachToComponent(VRRoot, FAttachmentTransformRules::KeepRelativeTransform);
LeftController->SetOwner(this);
LeftController->SetHand(EControllerHand::Left);
}
if need the cpp and .h files are here
ArchitectureExplorer/Source/ArchitectureExplorer at ControllerAsActor · hexaylon/ArchitectureExplorer · GitHub
Many thanks!