Sign in to follow this  

Suggestions on acelerometer paddle ball effect

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this