Jump to content
  • Advertisement
Sign in to follow this  
CD579

2D Rotating Bouncing box

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

Okay, I'm doing a little physics playtest app. I have this little box that I can bounce around the screen. I am currently using a single point to determine the box's location, and render from that one point. I wanted to add in rotation to the box, so it would correctly bounce around with gravity correctly affecting each vertex, so I changed my lil physics routine to calculate gravity for each vertex, instead of just the one box point. Now the problem I'm having is trying to keep the box a "box". When a vertex hits the side of the screen, it's velocity is reversed, which in turn makes the box shrink(one side of the box is going one way, the other side is going the opposite). How would I go about adding in rigidity to my physics playtest app? Anyone have any good formulas or sites I could take a look at? Should I keep using the single point formula, and just add a rotation velocity as well, or should I keep calcutating by each vertex? Thanks! CD

Share this post


Link to post
Share on other sites
Advertisement
look for jakobsen's articles.

http://www.gamasutra.com/resource_guide/20030121/jacobson_01.shtml

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!