Jump to content
  • Advertisement
Sign in to follow this  

Modify Gaffers integration code to a minigolf engine

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

Could someone give me some pointers how i could modify the code on: http://www.gaffer.org/articles/Integration.html to use it in a minigolf game. I have allready changed the code to use vectors (2d) instead of one dimension as in the example code. How can i do the other stuff, lets say that i want to hit a ball. I calculate the direction of the force and i know how big it is, where can i put that in the code. He writes that it´s the acceleration function that drives the simulation, but i dont know how to write a function that does what i want. I want the ball to move in the direction i hit it and that it should be affected by friction, it would be good if i could set the mass of the balls to. I´m not a genious when it comes to physics that´s for sure, so it would be nice if someone could break it down for me :)

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!