Search Unity

Question Animator Breaking HingeJoint Physics?

Discussion in 'Physics' started by Koaske, Feb 1, 2021.

  1. Koaske

    Koaske

    Joined:
    Mar 30, 2015
    Posts:
    22
    So, I want to animate a worm-like object that has a parent container, which contains 2 heads and 3 body parts, and they are connected to each other through HingeJoints.

    upload_2021-2-2_1-13-31.png

    A body part is connected to another body part that is to the left of it (in the base position), with the exception of the left head, which does not have a hinge joint component.

    The problem is that when I try use an animator (component of the parent "Centipede" object) to create motion for the object by moving its head, the hinge joints seem to break and not obey the initial anchor distances that I've set them to. I've set the Update Mode to "Animate Physics" in the Animator as well.

    Here is a video demonstrating how the hinge joints behave when not animated (the beginning part) and what happens when I try a simple animation where I move the right head towards the top-left:


    As you can see, in the latter part of the video, the distance between the head and the body part is a lot bigger than in the beginning of the video.

    Any help would be appreciated!