Renderable components that are attached to a PlayerController Blueprint are not visible in viewport or in game.

I’ve been working on a Steam (Vive) VR project. Initially all my motion controller components and the user’s hand meshes were put inside a SteamVRPawn Blueprint class instance (which I inherited from the Pawn). This worked fine.

After reading about Unreal architecture however I’ve found it more natural (from a MVC view point) to carry motion control logic to my SteamVRPlayerController class (which I inherited from PlayerController without an implementation yet). SteamVRPlayerController is supposed to handle all player related I/O events (hand controller buttons etc.) and decide when and how to manipulate the possessed SteamVRPawn.

I also want to render the vive controllers transparently for debugging, to adjust vr controller to hand offset and to give the user an idea about where his/her controllers are located.

My problem is as soon as I carry my motion controller component hierarchy (with arrow components as reference and vive controller static meshes) to my SteamVRPlayerController Blueprint, static meshes and arrows stop being rendered in the blueprint’s viewport. All meshes are set to Visible and also not hidden in game.

These components are not rendered in game either. But the hands do track the controller transformation with physical forces without a problem. I’ve attached SteamVRPlayerController’s transform to the possessed pawn’s transform so they both share the same coordinate space.

Is there any internal engine code in PlayerController class or within its hierarchy which disables rendering of all children? Or is there anything I did wrong?

Here is a screenshot of my SteamVRPlayerController Blueprint showing component hierarchy and view port. There should have been a visible (semi-transparent) hand mesh in place of the selected item. Also the dummy arrows in the hierarcyh should have been visible.

The funny thing is if I create a new blueprint based on my SteamVRPlayerController class everything works fine. I can drag and drop static mesh components and they are rendered correctly in the viewport and in game.

But something that I did with this blueprint disabled rendering of all attached components for some reason. I’ve compared all properties (class defaults, all component parameters etc) with the new blueprint class I’ve created and they all match.

I do not want to copy all the logic implemented in the original blueprint to the newly created one. (this will take time and I am not sure if this error will happen again).

What might have caused this issue?

Thanks in advance.

Did you ever resolve this issue? I am experiencing the same thing.

Thanks

I am seeing the same thing. One place I found that hides it is (I think) when you reposses an ejected pawn in play in editor:

void ADebugCameraController::OnDeactivate( APlayerController* RestoredPC )
{
    [...]
    RestoredPC->SetActorHiddenInGame(true);

That still doesn’t explain why it is invisible before ejecting/repossesing though…

This is the cause:

AController::AController(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer)
{

	PrimaryActorTick.bCanEverTick = true;
	bHidden = true;
#if WITH_EDITORONLY_DATA
	bHiddenEd = true;
#endif // WITH_EDITORONLY_DATA
	bOnlyRelevantToOwner = true;

In your derived controller’s constructor add:

bHidden = false;
#if WITH_EDITORONLY_DATA
	bHiddenEd = false;
#endif // WITH_EDITORONLY_DATA

That fixed it for me. The debug camera is still going to end up resetting things as mentioned in my earlier post, to fix that you need to update your cheatmanager to point to a derived DebugCameraControllerClass, and in that class override OnActivate and OnDeactivate to not touch the controller visibility if the controller being activated/deactivated is your derived controller.

This fixed the issue for me as well! @Matiati, if you also had the issue fixed for you then it would be nice to mark this comment as the green-highlighted “correct” answer

Blueprint (put this in your player controller)

230934-bhidden.jpg