Jump to content
  • Advertisement
Sign in to follow this  
papitorico

the physics of wiisports

This topic is 3164 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi im currently trying to make a baseball game using a wiimote. can anyone give an example, a link, a tip about the physics that i have to take into account when i move the wiimote and throw the ball. i'm using ODE as physics Engine. Thnx.

Share this post


Link to post
Share on other sites
Advertisement
You'll need to measure, integrate, and filter the complete state of the wiimote. It will likely already do this for you so that any point and time you can read its perceived position, velocity, and acceleration through space.

It is then up to you to intepret these physical properties of the remote and correlate them to behavior in your game. It may be benefitial to obtain an ideal or reference set of data for the way you want the game to be played. In other words, act as if the game is already implemented and use the wiimotes to play it while recording the properties i mentioned. Then create some sort of mapping from this recorded data to the action in the game.

But ultimately, it may be as simple as taking the velocity of the remote at the time the button was released, or when the velocity reduces, or changes directions, or what ever other trigger you can come up with, and applying this to the ball in game.

There's no right or wrong way to do it. It's up to your own creativity.

Share this post


Link to post
Share on other sites
As far as I have been able to tell from playing some of the wiisports games, most of them work in two "modes". When the velocity of the wiimote is low, it tries to map the orientation of the in-game bat/racket/etc with the orientation of the wiimote. So when you're holding the wiimote relatively still, you can see the bat traces the movements of the wiimote.

Then, when the velocity is over a certain threshold, it just swings the bat/racket/etc in the game. So regardless of the actual direction you swing the wiimote, the swing in the game is "correct". I think this is important for your game - you don't have to take the actual motion of the wiimote into account when throwing a ball/swinging a bat, just do the "correct" movement.

The bowling game seems to be a little different in that it'll monitor the orientation of the wiimote while you've got the "B" button pressed and try to match the bowler's arm to that orientation, but even that's not completely accurate (you can swing your arm back and forwards as much as you like, but the in-game arm will just swing once, for example).

This is just from my observations playing WiiSports (I haven't tried it with the MotionPlus thingy, so I don't know how much more accuracy that provides).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!