Apply a force that is offset and rotated (diagrams included)

So here is a quick model of a gameobject.
137177-model.jpg

The black box represents the gameobject. The gameobject has a rigidbody. The red dots indicate the locations forces are being applied, and the red arrows are the directions I want the forces to be applied in.


What I am trying to accomplish is shown in diagram A, however, what is actually happening is shown in diagram B.

The result in diagram B is because of the following code:

player_rigidbody.AddForceAtPosition(strength * Vector3.up, offset);

The Vector3.up causes the force to be applied within the worldspace instead of the localspace. However, I don’t know how to get a Vector3 of the localspace direction.
The only way I could achieve such a result is if I used AddRelativeForce, however, I can’t get the force offset like with AddForceAtPosition.


Soooo, here’s the question:
How can you combine the effects of AddRelativeForce and AddForceAtPosition at once?

Thanks,

-N

You can simply use transform.up instead of Vector3.up. All transform direction properties transform.up, transform.right and transform.forward will always be calculated relative to the rotation of the current GameObject.


Also, if you are always applying two equal and symmetric forces to your object, without ever making it rotate, to save some computation time and make it more simple, you might want to simply use player_rigidbody.AddForce(...) once, instead of AddForceAtPosition() twice, since two equal forces offseted by the same amount symmetrically about the center of mass will never produce any torque and therefore will have the same effect as a force applied directly to the center of mass.