Homebrew Unity for the wiiu (Motion Detection)

lyokohack

Well-Known Member
OP
Member
Joined
Apr 2, 2018
Messages
294
Trophies
0
Age
27
XP
1,049
Country
France
Hi everyone I couldn't set the wiimote motion detection detection in Unity2017 for Wiiu I tried the Doccumentation like this

Code:
using UnityEngine;
using WiiU = UnityEngine.WiiU;

WiiU.Remote remote0;
    WiiU.Remote remote1;

     void Start()
    {
        // Create Wii Remote objects using channel 0 and channel 1
        remote0 = WiiU.Remote.Access(0);
        remote1 = WiiU.Remote.Access(1);
    }

    void Update()
    {
        // Get the new state of the controllers
        WiiU.RemoteState r0State = remote0.state;
        WiiU.RemoteState r1State = remote1.state;
    
        // Check for input from player 1
        if (r0State.err == WiiU.RemoteError.None)
        {
            if (r0State.IsTriggered(WiiU.RemoteButton.A))
            {
                // The player 1 A button was pressed
            }
            // Get the orientation of the controller
          
            Vector3 r0Acc = r0State.acc;
            anim.play("Sword_Movement"); 
        }


    }
}

I added anim.play("Sword_Movement"); under Vector3 r0Acc = r0State.acc; , but it didn't work in my real Wiiu so I had to make my game work and the buttons too
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BakerMan @ BakerMan: this is him being described +1