4.21 - 4.22 Motion Controllers stopped responding

I have a very basic project where I am using C++ to generate motion controllers. If I open the project where it was created in 4.21 the hand controllers track just fine and show the mesh moving with my hand controllers. As soon as I migrate to 4.22, the meshes are located on the ground at (0,0,0) essentially and do not move at all with the controllers anymore. Is there a new way to setup motion controllers that I am missing??

MotionController = CreateDefaultSubobject("MotionController"); SetRootComponent(MotionController);

And then in my character class I set these motion controllers as components on a Root component of the character:

LeftHandController = GetWorld()->SpawnActor(LeftHandControllerClass); LeftHandController->AttachToComponent(VRRoot, FAttachmentTransformRules::KeepRelativeTransform);

This simple setup can be found on tutorials all over the web and it worked fine in 4.21. What has changed???

i had a problem with the new version too…
my right trigger wasn’t working anymore on my xb1 controller,
i switched back on 4.21 and it works again

I don’t understand how simple things like this break so easily? Do I need to just wait for 4.22.1+? I have wasted too much time trying to get this working where I could just go back to 4.21 and continue working, but I really want to try out the new features in 4.22.

Same issue here. VR Controllers just stopped working since moving to 4.22 from 4.21.2 today. Hope someone can help us out soon.

We are also having issues with using Tracking Pucks, Special_1 does not work. But Left and Right / AnyHand does work. (4.22)

Having this issue too, migrate simple blueprint from one project to another, and the motion controllers stop working. Hands just float in the air.

I had the same problem with 4.22, you need to Set Owner when you spawn the motion controller to the controlling pawn

Unfortunately this does not solve the issue. I tried right after spawning the controller and attaching it to the root component, using what you said and setting that controller’s Parent to this which happens to be the Character, but then the controls not only don’t move but don’t respond to input anymore.

I’m having the same exact issue :confused:

How are you able to set owner for a UMotionControllerComponent since it is not an Actor?

I ended up reverting back to 4.21 and its working again. I guess I’ll wait to update until there is a clear solution for this.

Same here honestly. Its not worth the extra headache. I reverted the same day and just kept working. Hope they patch it or find a workaround soon.

was same problem. It really helped me to set the owner (not parent) of the spawning controller. I don’t know how to do it in C++ but in Blueprint it looks like this

Same here. Mine even crashes the engine, not being able to even use the motion controllers altogether. This happens every time I touch the trigger button. (after migrating from 4.21 to 4.22)

My C++ code mimics this exactly. I call SetOwner on the spawned Actor that contains the motion controller and set it to the Character class and nothing works.

I suppose you look at the 4.22 vr template project and see if there are any new includes or other changes with the motioncontroller pawn.

I was having the same problem (however, I was not using C++, only blueprint) and this actually fixed it for me. Thanks!

It is possible to fix this if you are using a source code engine. It’s pretty much just a revert of the 4.22 changes back to 4.21.

In
Source\Runtime\HeadMountedDisplay\Private\MotionControllerComponent.cpp

change this:

bool UMotionControllerComponent::PollControllerState(FVector& Position, FRotator& Orientation, float WorldToMetersScale)
{
	if (IsInGameThread())
	{
		// Cache state from the game thread for use on the render thread
		const AActor* MyOwner = GetOwner();
		bHasAuthority = MyOwner->HasLocalNetOwner();
	}

to this:

   bool UMotionControllerComponent::PollControllerState(FVector& Position, FRotator& Orientation, float WorldToMetersScale)
    {
    	if (IsInGameThread())
    	{
    		// Cache state from the game thread for use on the render thread
    		const AActor* MyOwner = GetOwner();
    		const APawn* MyPawn = Cast<APawn>(MyOwner);
    		bHasAuthority = MyPawn ? MyPawn->IsLocallyControlled() : (MyOwner->Role == ENetRole::ROLE_Authority);
    
    	}

Which is just a rollback to 4.21. No idea if it has a knock on effect, probably a risk for a networked game.

Thanks for posting this. I guess this would work for people who want to work in 4.22 still, but I will just remain in 4.21 and continue working until they post a fix.

After contacting Epic directly and creating a new sample project for them, they responded with a known bug ticket/issue here: Unreal Engine Issues and Bug Tracker (UE-72941)

Everyone be sure to upvote that bug ticket so this gets resolved quicker please! I’m marking this as the answer since that link should tell us when this is resolved.