Google Daydream Motion Controller Erratic Behavior

Update: I tested this setup in 4.15 for about 10 to 15 minutes and I didn’t notice the problem. Within that same period of time I would notice the issue in 4.16 and 4.17 about 2 or 3 times every minute. I suspect the issue does not occur in 4.15, but does occur in 4.16 and 4.17.

These are the versions I was using in my 4.15 testing:

Google VR Motion Controller Version 1.2 (GVR NDK v1.10.0)
UE4 Version: 4.15.1-3348071+++UE4+Release-4.15

These are the versions I was using in my 4.17 testing:

Google VR Motion Controller Version 1.5 (GVR NDK v1.60.1)
UE4 Version: 4.17.0-3539197+++UE4+Release 4.17

These are the versions I was using in my 4.16 testing:

Google VR Motion Controller Version 1.3 (GVR NDK v1.40.0)
UE4 Version 4.16.2-3514769+++UE4+Release-4.16

This commit to the repo for google vr plugins solved the problem for me:

https://github.com/googlevr-unreal/UnrealEngine/commit/6ffbe30b34dffe410a1e2f0dbca1a6c5ca06fa86

This is not specific to 4.17. It happens also in 4.16.

I don’t know if I’m doing things right in terms of implementing daydream with UE4, but the method I’m using for my VR app is to use a first person template, and attach the motioncontroller to some part of the pawn.

When I do this I am seeing some erratic behavior with the google motion controller.

Everything else works fine. I have figured out ways to move around by sort of moving my thumb across the thumbpad like in Twilight Pioneer. I’ve figured out how to fire projectiles using the thumbpad, and so on, but every once in awhile I see this goofy artifact, and I cannot figure out what’s going on.

You can reproduce this issue by using the first person template, opening up the FirstPersonCharacter blueprint (pawn), and attaching the googlevrmotioncontroller component to capsule component (or also the mesh), and when I package and deploy the app to my pixel, and I then sort of wave the real controller around in space it will eventually produce a strange effect where in the app the mesh of the controller momentarily appears near the upper left hand corner of the screen for a split second.

Now, it doesn’t happen often, and I don’t know to what degree it is associated with anything the user is actually doing, but if you play around with it bit and wave the controller around, and sort of put the controller at strange angles, the effect will eventually occur. It appears to be totally random and not dependent on user action. It’s like it just bugs out for a quick, split second and then re-orientates itself correctly. Clicking the thumbpad seems to make the artifact appear more frequently.

I have included an image of where I’m putting the GoogleVRMotionController in the FirstPersonCharacter blueprint.

And this is basically all I’m doing before deploying the app to reproduce the strange visual artifact.

EDIT: I did more testing. I don’t think the artifact is produced randomly. As I can reproduce the artifact by laying the physical motion controller on a table in front of me, and just move my head piece instead. Then, depending on the position and orientation of the Head Mounted Display, the virtual controller on my display would entirely shift the position in my field of view like it did before. This time the shift of the mesh in my field of view would not be erratic, but I could get the shifted virtual controller to stay within my field of vision for a few seconds if I kept my head very still, and then as I moved it would sputter out and shift back to its original position. And it would do this over and over.

I used a print string on get forward vector of motioncontroller for more precise measurement, and again, the effect seemed totally random and not dependent on anything in particular. There didn’t seem anything special about the forward vector values. I suppose there is something going on with regard to the relationship of the motioncontroller to the Head Mounted Display.