Parent player HMD to actor

I’m trying to make a vehicle in VR and I need to be able to parent the player to the vehicle so that they can stay in.

I can SetActorLocation to that vehicle which does work, but on mobile, it lags back pretty bad, and this really isn’t an ideal solution. I tried doing a AttachToComponent from the player to the actor but this does nothing.

I can’t use a camera in the actor because the HMD only locks to the player.

You actually can remove the camera from the player. We do it in our VR game.

Here’s some lazy C++ code to find your camera and attach (In your game mode or playercharacter):

UGameplayStatics::GetAllActorsOfClass(GetWorld(), CameraClass, FoundActors);
for (auto &actor : FoundActors)
{
	if (actor->GetName() == TEXT("MainCamera"))
	{
		pPlayer->SetViewTarget(actor);
		break;
	}
}	

Here’s a blueprint example, in the persistent level:

127404-graph7.png

last edit: I just decided to put a cube inside the actor and make it invisible and then make the camera a child of the cube… what a weird workaround