Jump to content
  • Advertisement
Sign in to follow this  

Need Help Figuring Out "Gravity Hook" Physics

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

Hey guys,


I've got Mines and a Player,
I can obviously get both xy coordinates and I have constant gravity going too...


So basically my issue is this:


When I click to select a mine, While Holding DOWN the button, I need to get the character to move just like in Gravity Hook the Flash Game...


LINK  http://adamatomic.com/gravity/


Now obviously this involves applying force towards and away from said mine based on other forces like gravity and in both horizontal and vertical directions, also from above and below the mine depending on the location of the player.


I've made a couple of attempts already but none are working the way I want them to.


If anyone can lead me in the right direction without Cryptic Written Math with symbols.. I'd greatly appreciate it, especially in code..


This is in Java

So I have a class for both the player and mine.. both have xy locations and .. gravity is  just a constant force inside the player class..

Player also has xVelocity and yVelocity

Edited by Synju

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!