wiimote and atan2

WiiMote's pitch and roll inputs should use atan2 instead of atan, to allow for full 360° reporting (yay upside-down mode!)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

franz's picture
why not

as it is kind of difficult, when holding a wiimote in one's hand, to perform a full 360 in any of the 3 axis (pitch, roll, yaw). But still an interesting feature. btw, i noticed in the latest patch, that you added a "yaw" output, how did you generate it ? with internal maths ?

To me, a "wiimote rumble patch" (separate) would be more usefull. Wiimote rumbling really adds an 'immersive" feeling. On the wii menu, every slightest little move generate a lil' rumbling... and it is damn awesome (you feel like you're actually holding something)

Anyhow....

cwright's picture
360°

It is difficult to do a full 360°, but it's trivial to get the "top" (button side) to point downish, especially the roll data because wrists have ~180° of motion. doing this causes a non-intuitive reversal of the angle (e.g. 85 instead of 95), which to me gives it a detached feel (because it stops doing what I'm doing)

I have pitch and roll, but yaw isn't possible because there isn't any force change when you rotate it parallel to the gravity-axis (this happen when you rotate it about the "up-down" axis). pitch and roll are calculated by taking a simple atan of (yForce/xForce) (plus some normalization math, but that's the gist of it). Simply changing it to atan2(yforce, xforce) would give us the full range of motion (allowing quite possibly my favorite wii menu feature: upside-down pointers ;)

Shouldn't the rumble control be an input into the patch (and maybe led control too?)