Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question Moving a connected rigidbody using ConfigurableJoint's connected anchor?

Discussion in 'Physics' started by markuskir, Dec 5, 2022.

  1. markuskir


    Mar 2, 2018
    Hey, checking to make sure that this is possible and to see if anybody has advice. Help is highly appreciated!

    I have a rigidbody connected to another using a configurable joint. What I want to do is move the connected rigidbody to a new position and rotation relative to the main body while maintaining the joint connection... it seems like it should be possible using the connectedAnchor and Axis properties, but every time I try, the objects go flying.

    Pic attached, B is connected to A via a ConfigurableJoint, I want to move B to TAR.

    The motivation for this is moving objects to precise locations using forces rather than transform.position. For instance, I want to move a jar containing physics objects into the character's hand, into an exact pose, while maintaining collisions between the jar and objects inside it. It should also continue to collide with physics objects along the way. If alternative approaches come to mind, please share!