Jump to content
  • Advertisement
Sign in to follow this  
reaperrar

2D rotational physics

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

Not sure If my understanding is accurate (this is all in 2D)...

If you apply a force to an object, say a solid 2D square. The movement will be based on where the force is applied and the angle of the force. Like, If my square had a big thruster on the back and two small thrusters on the side but towards the front, the big thruster will push the square forward and the two smaller thrusters will cause the square to be pushed a little to the side but also cause the square to rotate.

How can I simulate this in my 2D game?

I'm thinking Id have something like this:

Object.ApplyForce(2DVectorForce, 2DVectorLocalPositionForce);

Just don't know the math or if this is even close.

Share this post


Link to post
Share on other sites
Advertisement
Hi there,

You already know that a force makes something move forward. In classical mechanics we say force equals acceleration times mass.
The rotational counterpart to this is torque equals angular accelleration times moment of inertia, and this is what you need for your simulation.

Here is all you need to get started:

http://en.wikipedia.org/wiki/Torque
http://en.wikipedia....ar_acceleration
http://en.wikipedia....ment_of_inertia

cheers,
Mike

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!