Jump to content
  • Advertisement
Sign in to follow this  
Cytrox

Need Help Figuring Out "Gravity Hook" Physics

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!