Rotate rigidbody around point

I need a way to rotate a rigidbody around a specific point. The problem is, that it should react realistic and I can’t use a fixed joint for it.

What I’m looking for is AddTorqueAtPoint(Vector3 torque, Vector3 position)

Of course this method isn’t implemented, but there should be a way to rotate the rigidbody correctly by applying two (continuous) forces on the opposite sides of it, but I can’t figure out how far away from the center and how strong these forces should be.

I’ll try to clarify what I’m trying to do. I have multiple objects that have the same parent. The parent has a rigidbody. I want to add a torque to one of the child objects so that it rotates to a specific rotation (using a maximum of force, so that it still interacts correctly with other objects)

The reason why I don’t want to use different rigidbodies that are connected with joints it that the objects should stay absolutely fixed together. Connecting rigidbodies results in very strange vibrations in the objects, which makes it impossible to use for the game I’m working on.

Here is a small sketch… I hope that clears up what I’m trying to do. Thanks to those who already tried and thanks in advance to those who will (hopefully) help me later!


Hi, the question seems to be old enough, but perhaps my answer can be useful for later readers.
I’ve had the same problem - needed to rotate the rigidbody around some center (other object).
Had very bad days trying to calculate the physics on my own, but finally got it working with simple HingeJoint.
You may have tried this, but I achieved to make it work without any vibrations of rotating object. You just need to make sure that:

  1. you’re not using any springs on your hinge joint (center)
  2. the applied forces are perpendicular to the connecting vector of these objects (center and rotating object).

You don’t need to change the gravity center of rotating object in this case.
Just make your center’s rigidbody NON-kinematic, but freeze all position axes. Also freeze the rotation axis of HingeJoint’s enabled axis. I.e. if you have enabled axis X on hinge joint, freeze this in rigidbody.

Now your center object will rotate around itself (this doesn’t matter) in all axes except the one that makes the orbital object rotate.

This way you have object that can rotate around that center in all 360 degrees (like electrons around the core of atom).

In particular case, if you need to make it rotate on plane (like planets around the star), just make your center Kinematic and enable the axis (axes) around which your orbital object will rotate.

This is near to impossible with applying two forces blindly. The Physics system calculates the inerita tensor from all the rigidbody’s colliders.(See Unity’s inertiaTensor and inertiaTensorRotation) This tensor will affect how likely an object will rotate around a certain axis. Generally all forces applied to a rigidbody will result in a combination of a linear movement (velocity) and a rotation around the center of mass in one axis (angular velocity).

What you want is near spaceship science and they know every parameter of their ship. Besides that Physx is a physics simulation which just simulates real world physics, but the result is never accurate.

The best way might be to calculate a path to your target (great circle or elliptic) and just continuously set the rigidbody’s velocity manually to the tangent vector of your path.

Perhaps a fix could be for you to create an empty game object at the point in which you would like to rotate around and set it as the parent of your objects transform and apply the torque to that object. When OnCollisionEnter is called destroy the empty object?

Set the contraints on the Rigidbody ( freeze pos(x,y,z) rot(x,z) ) and AddForce from the Docs. – Unity - Scripting API: Rigidbody.AddForce

PS: Alter the settings to your requirements.