Search Unity

Problem with hinge joint

Discussion in 'Physics' started by symorian, Aug 20, 2017.

  1. symorian

    symorian

    Joined:
    Jun 7, 2017
    Posts:
    69
    Hi,

    I just wanted to add a "bridge" system in my game.
    The scenario was that when player comes to specific point he stands next to a lever with which he can lower a bridge so he would be able to pass across the abyss.

    Instead of doing the script work with rotation, I decided to give "hinge joint" a go.
    I placed the the hinge joint at the far left of my bridge that is supposed to be lowered and stay parallel to the ground after rotating/sweeping 60 degrees.

    When I press play(will be done with lever but just for testing purposes), the bridge is lowered using the motor and it stops at the provided limits correctly(not perfectly indeed, when I check the transform I see a -0.006 degree of error despite setting the limit as "0" degree).

    The issue is, when I arrive at the bridge with my player and jump on it the bridge slightly bounces, and does not firmly rest parallel to the ground, thus, generating a 1-2 degree of slope which bypasses my player's ground checker's.

    I tried many other things like raising the bridge's mass to 100000 to bypass the force applied by player jumping on it... etc... none of them worked.

    How can I get it to stay "solid" at a "0" degree and prevent it to absurdly bounce or get broken when the player jumps on it??

    Thank you all!