Wiimote and Unity

210 views
Skip to first unread message

Pierre-Antoine Arrighi

unread,
May 1, 2015, 2:39:05 AM5/1/15
to vr-g...@googlegroups.com
Hello!

I am working on a research project where I want to connect interfaces with a 3D scene displayed on Oculus Rift DK2. I work on Windows 7 x64 and Unity Pro. I would like to interface a Wiimote to Unity but all the solutions I managed to find on the net did not work...
I thought I might have to use a VRPN server but it seems quite complicated.

What would you recommend in this case?

Thank you very much!

Jan Ciger

unread,
May 1, 2015, 6:41:34 AM5/1/15
to vr-g...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Well, Wiimote is always quite complicated :)

You can use the Wiiuse library (tooting my own horn here as I am a
contributor to it) to talk to the Wiimote and then expose it to Unity.
Either directly if you have the Unity version that works with C/C++
plugins or through a network socket connection.

The Wiimote server in VRPN uses Wiiuse internally, but I am not sure
what is the status of that code - I did have some issues with it when
I have tried it last time.

If you decide to go the Wiiuse route, do make sure to get the latest
code from the Github repository. The stable release is quite old and
may have issues that are fixed in the current git master branch - such
as the support for the new Wiimote revision.

The code is here: https://github.com/rpavlik/wiiuse


There are probably other ways to make Wiimote talk to Unity, e.g.
through GlovePie and use the Open Sound Control protocol to talk to
it, but it would be a rather fragile kludge.

Jan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iD8DBQFVQ1hZn11XseNj94gRArrPAKC7HU5xsFFtUTk/uhaUdEljUMoMAwCeOHE/
AeIL8OkQhzIL4mdKyVTY+dA=
=Ugp0
-----END PGP SIGNATURE-----

Pierre-Antoine Arrighi

unread,
May 1, 2015, 7:19:30 AM5/1/15
to vr-g...@googlegroups.com

Hello Jan,

thanks a lot your reply. I already tried GlovePie, FreePie or WinRemote, none of this works. The only way i managed to connect the Wiimote was through Dolphin emulator (I managed to stop the blinking of the four leds and get a steady light on led 1. didnt went any further as i do not have any iso to test if its working but i will try this next).

I will try your solution with Wiiuse but I am not a developer (but willing to learn ;) ) so I will probably need some more help.

Thanks a lot

Jan Ciger

unread,
May 1, 2015, 7:26:24 AM5/1/15
to vr-g...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/01/2015 01:19 PM, Pierre-Antoine Arrighi wrote:
>
> Hello Jan,
>
> thanks a lot your reply. I already tried GlovePie, FreePie or
> WinRemote, none of this works. The only way i managed to connect
> the Wiimote was through Dolphin emulator (I managed to stop the
> blinking of the four leds and get a steady light on led 1. didnt
> went any further as i do not have any iso to test if its working
> but i will try this next).
>
> I will try your solution with Wiiuse but I am not a developer (but
> willing to learn ;) ) so I will probably need some more help.
>

Um, if none of the above worked to connect and only Dolphin works,
then you are most likely using the new RVL-CNT-01-TR Wiimote (the
older ones show only RVL-CNT-01 name). Unfortunately, Nintendo has
changed the connection protocol on that one.

One of the things Nintendo changed is that you cannot put the Wiimote
into discoverable mode by pressing 1+2 buttons any more. You need to
push the red sync button in the battery compartment instead.
Alternatively you can use one of the available Windows utilities to
permanently pair the Wiimote with your PC, then it will connect
automatically.

Dolphin and the latest Wiiuse (the git master) have code to support
this Wiimote revision. Otherwise, you may want to find an older (non
- -TR) Wiimote.

Regards,

Jan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iD8DBQFVQ2Lcn11XseNj94gRAsiRAJ0eLBmxAyKIDuCcSNB5Rr/IbJZ7SACfZNRv
z6RG4I3HHjISFwomR7EEXY8=
=QL5f
-----END PGP SIGNATURE-----

Pierre-Antoine Arrighi

unread,
May 7, 2015, 2:25:47 AM5/7/15
to vr-g...@googlegroups.com
Hello Jan,

I confirm I have the RVL-CNT-01-TR Wiimote and getting an old one is not really an option.
Regarding Wiiuse I am trying to make it work while learning how to use an IDE.

I will keep you updated on this subject ;)

Regarding Unity, you mentioned "Unity version that works with C/C++ plugins or through a network socket connection", how do I know what is the best option?

Thank you very much,
have a nice day

Jan Ciger

unread,
May 7, 2015, 7:17:40 AM5/7/15
to vr-g...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 05/07/2015 08:25 AM, Pierre-Antoine Arrighi wrote:
> Hello Jan,
>
> I confirm I have the RVL-CNT-01-TR Wiimote and getting an old one
> is not really an option. Regarding Wiiuse I am trying to make it
> work while learning how to use an IDE.
>
> I will keep you updated on this subject ;)

Alright :) The current Wiiuse code in git has a patch merged that
should make it work.

>
> Regarding Unity, you mentioned "Unity version that works with C/C++
> plugins or through a network socket connection", how do I know what
> is the best option?

I am not really Unity guy myself, so I perhaps this isn't entirely
accurate anymore. I know that they used to allow C++ plugins only for
the Pro version, not in the Free one. So if you are using a Free
license, you must use the network socket workaround because there is
no way to load a C++ DLL into Unity.

Generally speaking, you should try to avoid going through a socket,
because it adds some latency and complexity. However, sometimes it is
either necessary (free Unity license) or it may have other advantages
(like VRPN - but that's another issue).

Regards,

Jan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iD8DBQFVS0nRn11XseNj94gRAmJmAJ9YXB/LjQtT8lrtB8SShzvjyxriOwCgpS9u
xmJP6Z+wgotyc4JtoJafnRo=
=L+YN
-----END PGP SIGNATURE-----

Pierre-Antoine Arrighi

unread,
May 8, 2015, 4:12:06 AM5/8/15
to vr-g...@googlegroups.com
Hello!

Thanks for the details, I am using Unity Pro so it should be alright to use a C++ plugin.
In an ideal world I would like to use a VRPN server in order to connect also other sensors, but given my competencies that's more like a fantasy :)

Thank you very much for your help!

Jan Ciger

unread,
May 8, 2015, 7:43:44 AM5/8/15
to vr-g...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/08/2015 10:12 AM, Pierre-Antoine Arrighi wrote:
> Hello!
>
> Thanks for the details, I am using Unity Pro so it should be
> alright to use a C++ plugin. In an ideal world I would like to use
> a VRPN server in order to connect also other sensors, but given my
> competencies that's more like a fantasy :)

Well, VRPN is perhaps easier than using Wiiuse directly, the problem
is that the Wiimote code in VRPN may not be functional. I remember
having problems with it, not sure what its current state is.

Jan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iD8DBQFVTKFqn11XseNj94gRAgchAJ4qZotDvHQ3ObcLd05bUw6WfIM6+ACguaqz
kMgqyuTZh5PbCuYbM+e9S1k=
=6H8g
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages