Jump to content
  • Advertisement
Sign in to follow this  
meteors

Suggestions on acelerometer paddle ball effect

This topic is 3602 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

Greetings, I wish to implement a set of functions so that I can propel an object a variable distance, from a vector of force passed as argument, or even just a simple integer. To clarify, imagine a paddle ball. The ball is sent out based on the amount of force applied, travels a distance, and then comes back. If necessary, I can use a "ball bounce" effect for a somewhat different play style. This is going to be used with an acelerometer device. If I can explain this any more clearly, please let me know. Any suggestions? Thank you in advance!!!!! -joshua

Share this post


Link to post
Share on other sites
Advertisement
I don't quite understand what you're asking, I think you're asking for the force applied by an elastic string?


float StringForce(float DistanceFromPadde, float k)
{
if (DistanceFromPaddle < StringLength)
return 0;

return k*DistanceFromPaddle;
}


Where K is the spring constant.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!