Jump to content
  • Advertisement
Sign in to follow this  
evren bingol

Future Position of a Ball/ time takes to travel

This topic is 3206 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 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
Advertisement
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!