Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.
This repository was archived by the owner on Sep 19, 2025. It is now read-only.

Left joycon is laggy #4

@raytsang

Description

@raytsang
WhatsApp.2024-04-3016.43.37_08a4eef5.mp4

It is the Test3.scene and modify the GyroRotate.cs to the following to separate left and right joycon:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem.Switch;

public class GyroRotateL : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        if (SwitchJoyConLHID.current.buttonSouth.wasPressedThisFrame)
        {
            // SwitchControllerHID.current.ReadIMUCalibrationData();
            SwitchJoyConLHID.current.SetIMUEnabled(true);
        }
        transform.eulerAngles = SwitchJoyConLHID.current.orientation.ReadValue() * 0.1f;
    }
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem.Switch;

public class GyroRotateR : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        if (SwitchJoyConRHID.current.buttonSouth.wasPressedThisFrame)
        {
            // SwitchControllerHID.current.ReadIMUCalibrationData();
            SwitchJoyConRHID.current.SetIMUEnabled(true);
        }
        transform.eulerAngles = SwitchJoyConRHID.current.orientation.ReadValue() * 0.1f;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions