Jump to content
  • Advertisement
Sign in to follow this  
meteors

Suggestions on acelerometer paddle ball effect

This topic is 3664 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!