x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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???

Product Version: UE 4.22
Tags:
more ▼

asked Apr 04 '19 at 11:05 AM in VR

avatar image

TwitchXerotalent
16 4 4

avatar image AUGHH Apr 04 '19 at 12:53 PM

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

avatar image TwitchXerotalent Apr 04 '19 at 02:32 PM

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.

avatar image ElNeneDrow Apr 04 '19 at 08:02 PM

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.

avatar image imaekgames Apr 05 '19 at 08:25 PM

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

avatar image Pinworm Apr 06 '19 at 10:19 AM

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

avatar image TagoWill Apr 16 '19 at 01:26 PM

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)

avatar image IndieGameCove Apr 17 '19 at 02:36 AM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

4 answers: sort voted first

After contacting Epic directly and creating a new sample project for them, they responded with a known bug ticket/issue here: https://issues.unrealengine.com/issue/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.

more ▼

answered May 15 '19 at 02:58 PM

avatar image

TwitchXerotalent
16 4 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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

more ▼

answered Apr 09 '19 at 02:43 AM

avatar image

Devero
2.3k 114 62 234

avatar image TwitchXerotalent Apr 11 '19 at 01:05 AM

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.

avatar image Katianie Apr 11 '19 at 01:26 PM

I'm having the same exact issue :/

avatar image ladyplaisir Apr 16 '19 at 02:41 AM

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 thisalt text

screenshot-517.png (84.5 kB)
avatar image TwitchXerotalent Apr 16 '19 at 10:58 PM

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.

avatar image iliator Apr 23 '19 at 10:03 AM

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

avatar image Katianie Apr 13 '19 at 10:54 PM

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

avatar image Katianie Apr 14 '19 at 07:34 PM

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.

avatar image ElNeneDrow Apr 15 '19 at 05:34 AM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

more ▼

answered May 13 '19 at 06:30 PM

avatar image

User-970075953
61 5 3

avatar image TwitchXerotalent May 15 '19 at 02:56 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi everyone,

It's coming from their all new HasLocalNetOwner() which should normally crashed when the owner is the level. And instead always returns false;

 bool AActor::HasLocalNetOwner() const
 {
     // I might be the top owner if I am a Pawn or a Controller (owner will be null)(Epic's comment)
     const AActor* TopOwner = this;
 
     // Epic tries to retreive the last owner
     if (Owner != nullptr)
     {
         // I have an owner so search that for the top owner (Epic's comment)
         for (TopOwner = Owner; TopOwner->Owner; TopOwner = TopOwner->Owner)
         {
         }
     }
 
     // Top owner will normally be a Pawn or a Controller (Epic's comment)
     // WRONG !! It can be the level itself in case of spawning an actor from it !
     if (const APawn* Pawn = Cast<APawn>(TopOwner))
     {
         return Pawn->IsLocallyControlled();
     }
 
     // The level hasn't got controller so normally "Controller->IsLocalController()" should crash the engine
     const AController* Controller = Cast<AController>(TopOwner);
     return Controller && Controller->IsLocalController();
 }

That's really strange that code has successfully passed the Q&A tests.

Anyway, in your FActorSpawnParameters.Owner, make it to nullptr and maybe should do the trick.

UPDATE : That worked for me I got back my controllers. Now the Custom Depth haha :p

Best regards,

Alexandre

more ▼

answered Jun 17 '19 at 01:00 PM

avatar image

Alexandre_Marie
39 2 5 11

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question