Hi everyone! This is my first question here

I’m currently experimenting about physically simulating a spaceship in space with several propellers.

I’m trying to figure out how “AddForceAtPosition” works.

I understand that a force applied to a rigibody at a certain position results in a force applied to the center of mass and a torque simultaneously, as stated in the docs. But how much of each one? How can I calculate them?

Thank you in advance.

@OrbitGames is right. You can take a look at the source code of Box2D here (also Unity’s 2D physics engine) to see how things are calculated. I think that’s as close as the truth as you will get since we don’t know if or how Unity engineers have modified the engine from the original (but since this is pretty fundamental stuff, I doubt they have).

it would violate the energy conservation principle

You would think so wouldn’t you. In fact I was wrestling with the same suspicion when I stumbled upon the implementation of Box2D’s `ApplyForce(force, point)`

method in ActionScript3 for the first time some years ago. The implementation can be found in this .h file and as said the relation of torque and force don’t depend on the point where the force is applied.

```
m_force += force;
m_torque += b2Cross(point - m_sweep.c, force);
```

And here and here are some explanations why.

Quote:

I think the problem is that your intuition tells you that applying a force F to a body for a certain time period Δt means that you are transferring energy proportional to F⋅Δt. This is not true in the general case. The energy transferred is the work done by the force: F⋅d, where d is the displacement along the direction of the force of the point that the force is applied to. Basically, when you apply the force along the center of mass of the body, the displacement will be smaller, because it corresponds to an equal displacement of the whole body, but when you apply the force further from the center of mass, the displacement will be larger because it is a combination of displacement of the whole body and rotation of the body.