# Pull one rigid body to a specific location/rotation?

Is there a way to make one rigid body go towards a specific spot and rotation?

Imagine something like a rope being attached to it, then the rope gets shortened until the object is in the right spot.

There is a similar effect in this video, but it is with softbody objects within cinema4d https://www.youtube.com/watch?v=huBMoui_xG8

• you could make it fall, bake the simulation, and create some keyframes at the end so that it ends up at the good location? Commented Oct 18, 2023 at 7:57

You can use an animated rigid body constraint to do this.

Start at frame 2, by orientating your object in the desired, final orientation. Keyframe location/rotation. Give it the animated property and keyframe that on. We do this at frame 2, because frame 1 will establish the relationship between the rigid body and any rigid body constraints, and because there seem to be some precision issues where frame 2 can have an effect.

On frame 3, move the object to the location where you actually want the simulation to start, then keyframe location/rotation. Duplicate these keyframes to frame 4 to prevent the object from starting with any velocity, then keyframe the animated property off on frame 5.

Now, create an empty at the location of the object on frame 1, and give it rigid body constraint physics. Set the first body to some non-moving, anchoring rigid body (I'm using the floor here) and the second body to the object you want to pull to a specific orientation. Set the rigid body constraint to generic spring. Set the stiffness and damping of all spring axes to 0 and keyframe them. Move these keyframes to whichever you want to start dragging the rigid body to the desired orientation.

Now move to whichever frame you want the object to definitely have the desired orientation. Set the damping and stiffness for the rigid body constraint to high values and keyframe them.

Play the animation. You will see that on frames 1-4, your sim doesn't do anything; then, it acts normally, until the spring starts to have an effect. As the spring's strength ramps up, the constrained rigid body is pulled to its original, frame 1 orientation.

Tune the strength and timing of the rigid body constraint. When you are happy, you can either bake rigid body physics to keyframes and then discard your first four frames, or you can bake the physics as physics and discard the first four frames of your render.