Thursday 23 October 2008

Using the Wii Remote with Director

Proof Of Concept time folks!

Using an example from my module for 3D graphics using Director and the example code for the Wii Remote Director Xtra, I've managed to demonstrate how it is indeed possible for the Wii Remote to change variables in Macromedia Director MX (note: the Xtra only seems to work for MX, those with the new Adobe Director probably won't get anything working, tough :P).

Obviously, this isn't exactly the first time anyone's done this before (yeh, obviously!) but this stage of my research moreorless defines the direction in which my project is likely to take - for the programming portion of it at least.

The screenshot below shows what I came up with... It's the quickest and dirtiest method, but I just needed to see for myself that it's possible to manipulate 3D graphics, albeit on a basic level, using the Wii Remote.

I set the program up to make the cube rotate about the x-axis and the sphere rotate about the y-axis. In terms of the Wii Remote this means that pointing it up or down will make the cube move and tilting it from side to side will make the sphere spin from side to side.

The program is very responsive with no delay between making the movement with the remote and seeing the result of the movement reflected on the screen.

When I placed the remote on a flat surface and flicked it to make it rock, even these small rocking movements were registered. All in all, this test was a complete success! The next test will be to import a terrain/model from 3dsMAX that's slightly more complicated, just to see if the smoothness of this test can be maintained.

One thing to note for all this - this is just taking the numbers from the Wii Remote Xtra and using them without performing any calculations. I also didn't have much regard for HOW the 3D models were moved/rotated, I just used the first method that came to hand, therefore the test doesn't respond as expected sometimes...!

The next task will be to have the 3D models moving in exact relation to the way the Wii remote is pitched or rolled. i.e. the changes aren't relative, they should be absolute! Another task will be to officially begin my research into specialised user-interfaces and methods of control. This will all hark back to my original ideas that involved the use of webcams - who knows, this method of control may crop up again in my project!

No comments: