Jump to content
  • Advertisement
Sign in to follow this  
anupgupta

collosion Impact

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

Hello I am currently working on a 2D project...in which an object falls from a random height in y direction...as soon as the object collides with the ground...the ground shakes...in this case i am trying to shake the background image in x direction for showing(make feel) the impact... Thus the higher the height more the impact and lesser the height less the impact... In this case the background image shakes for more time if impact is more and shakes for less time if impact is less... Please can anyone suggest some ways as to how is this possible to achieve...possibly some examples... Any suggestion would be of great help.... Thank You

Share this post


Link to post
Share on other sites
Advertisement
well, here's my suggestion:


take this variable called obj_y_start


that variable is where the object starts.



next, take the y value where the object lands and subtract the two.



finnaly, use these values to shake the screen.

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.

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!