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

In-Editor Input simulation does not allow for head tilt/camera roll

Open hendryems opened this issue 7 years ago • 2 comments

Describe the problem

From the documentation, it doesn't look like head tilting (camera roll) is something that's supported:

image

Here's what's desired: image

This is also something that's supported in the HL simulator:

image

This is critical to be able to test out code that more accurately mimics user's head movement without having to deploy onto a physical HMD.

Describe the solution you'd like

Extend ManualCameraControl.GetCameraControlRotation (source) to include additional keys that supports this:

            if (this.isGamepadLookEnabled)
            {
                ...
            }

            KeyboardLookTick(ref rot);

            if (this.ShouldMouseLook)
            {
                ...
            }

KeyboardLookTick implementation would be something like this:

    private void KeyboardLookTick(ref Vector3 rot)
    {
        // TODO: Make keys customizable from profile
        if (Input.GetKey(KeyCode.Comma))
        {
            rot.z += InputCurve(Time.deltaTime * this.keyboardRotationSensitivity);
        }
        else if (Input.GetKey(KeyCode.Period))
        {
            rot.z -= InputCurve(Time.deltaTime * this.keyboardRotationSensitivity);
        }
    }

Describe alternatives you've considered

N/A

Additional context

N/A

hendryems avatar Aug 01 '19 19:08 hendryems

Main obstacle here is the crowded keyboard mapping for input simulation. The Q/E keys in particular are already used by the hand rotation feature, which occupies 6 keys in total and is very awkward to use. It would prefer to try and refactor the hand rotation using mouse movement first, using some kind of turntable + twist combination. That would free up the keys for camera rotation as well.

ghost avatar Aug 06 '19 15:08 ghost

This works now

ericob avatar Nov 21 '19 22:11 ericob