MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

ParabolicTeleportPointer doesn't always register itself correctly

Open keveleigh opened this issue 8 years ago • 8 comments

Does this affect the legacy HoloToolkit (master) or the Mixed Reality Toolkit (mrtk_release)? Mixed Reality Toolkit

Describe the bug Sometimes, the pointers don't seem to register themselves correctly on app launch. I haven't been able to get a 100% repro, but I see this ~20% of the time.

The line pointer only extends out a short distance, and the teleport pointer stays visible.

To Reproduce This happens on app launch with a controller attached. I'm not able to get a 100% repro.

Expected behavior The pointers register and work.

Actual behavior Sometimes, the pointers don't properly register themselves.

Screenshots image

image

Mixed Reality Toolkit Release Version mrtk_development

keveleigh avatar Sep 11 '18 18:09 keveleigh

What change in #2750 fixes this?

keveleigh avatar Sep 11 '18 20:09 keveleigh

It's part of the visibility on start changes.

StephenHodgson avatar Sep 11 '18 20:09 StephenHodgson

This was not fixed in #2750.

image

The cursor no longer appears (as expected), but registration still fails.

image

keveleigh avatar Sep 12 '18 18:09 keveleigh

Awe man, okay. Did you have any idea about better repro steps?

StephenHodgson avatar Sep 12 '18 20:09 StephenHodgson

Unfortunately, no. It seems to happen the first (or first few) times I run either on editor launch or after a while of not running. After it resolves itself, subsequent runs do not repro the behavior.

keveleigh avatar Sep 12 '18 20:09 keveleigh

I have the same issue with a class that inherit to LinePointer. This is a very basic class :

public class CustomLocomotion : LinePointer
{
    [Tooltip("Define the maximum value of the dead zone of the thumbstick")]
    public float DeadZoneValue = 0.2f;

    private Vector2 position = Vector2.zero;

    public override void OnPositionInputChanged(InputEventData<Vector2> eventData)
    {
        base.OnPositionInputChanged(eventData);

        // This makes sure that the input event we received is the input we want to listen to
        if(Controller.InputSource.SourceId == eventData.InputSource.SourceId)
        {
            // If eventdata description isn't from the thumbstick (action = Move). Exit this function
            if (eventData.MixedRealityInputAction.Description != "Move")
                return;

            position.x = eventData.InputData.x;
            position.y = eventData.InputData.y;

            // Define a dead zone
            if(Mathf.Abs(position.x) < DeadZoneValue)
            {
                position.x = 0f;
            }
            if(Mathf.Abs(position.y) < DeadZoneValue)
            {
                position.y = 0f;
            }
        }
    }

    /// <summary>
    /// Get the position of the thumbstick
    /// </summary>
    /// <returns></returns>
    public Vector2 GetPosition()
    {
        return position;
    }
}

architekth avatar Sep 13 '18 15:09 architekth

I was able to get some solid repro steps for this.

I can repro 100% if I turn off the Windows Mixed Reality Portal and turn it back on again, then press play.

There seems to be a long startup period after pressing play in the editor that only seems to happen the first time. I'm not entirely sure what's going on during this time, but it seems to be part of the issue.

I'll update as I find more information.

StephenHodgson avatar Sep 16 '18 17:09 StephenHodgson

I can also 100% repro if the headset goes to sleep and I press play from the editor to wake it up.

StephenHodgson avatar Sep 16 '18 17:09 StephenHodgson