# Animating a Dragging Object using Physics

I’m working on a 2d platformer and I’ve been trying to figure out how to set up and properly animate a player character with a large object they drag behind them using both hands. I thought it would be more interesting to have the object be animated with the physics engine so it would interact with the environment in interesting and more believable ways rather than hand drawing out each individual frame or animating using key frames and a skeletal rig. I had the thought of using hinge joints between segments of the arms and the object and that almost works, but I feel like I’m trying to use those joints in unintentional ways and sometimes they act accordingly. How would I go about making a system to create the arm and object movement? Would I need to write out a new script to procedurally generate the limb/object placement?

Write a code that says :
1/phisics Force on the dragged object is equals to its distance from the hands…
2/ Physics direction on dragged object is equals to the vector from the drag object to the hands .
You can add a little Neutral Distance of no effect around the hands and then you can adjust the drag and the weight of your stuff so that it moves exactly at the speed that you want.

Physics addforce in code is simply the vector in between the hands and the drag object every frame And you can multiply that vector and add drag And weight changes to the drag object…

If you set the drag high, the object will slowly converge towards the hands. If you set it light with low drag, you can even make it flip around like an elastic band everywhere and slowly coming closer to the hands position. It’s cool and you can learn a lot of physics trick that way.

IT’s about 5 lines of code, the addforce = vector (hands pos - dragged obj pos) ;

something like that.

you can use two types of force, look inthe physics force options. one is mroe instantaneous and one has a different effect.

you can also lock one of the movement planes for 2d. in the physics component for that object.