Sign in to follow this  
evren bingol

Future Position of a Ball/ time takes to travel

Recommended Posts

Hi I am working on a soccer game and trying find the time to travel a distance when applied certain amount of force. How do I calculate the friction for the environment I am using bullet physics engine. It has damping , angular damping and bunch of other params. such as friction , hit friction and what not. I have read the APIs and it says that damping is the only resistance that is applied to the objects. So i set my friction to (-damping) but it does not produce right values. time to travel Ogre::Real speed = force /m_Mass; Ogre::Real DistanceToCover = A.distance(B); Ogre::Real friction = ? Ogre::Real term = speed*speed + 2.0f*DistanceToCover*friction; //if (u^2 + 2as) is negative it means the ball cannot reach point B. if (term <= 0.0) return -1.0f; Ogre::Real v = Ogre::Math::Sqrt(term); //it IS possible for the ball to reach B and we know its speed when it //gets there, so now it's easy to calculate the time using the equation // // t = v-u // --- // a // return (v-speed)/friction; Thanks a bunch in advanced.

Share this post


Link to post
Share on other sites

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