Sign in to follow this  

2D rotational physics

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
Hi there,

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

Here is all you need to get started:



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this