Hi everyone I couldn't set the wiimote motion detection detection in Unity2017 for Wiiu I tried the Doccumentation like this
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
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