Search Unity

HingeJoint2D keeps rotating with useMotor = false

Discussion in 'Physics' started by glad, Jun 18, 2019.

  1. glad

    glad

    Joined:
    May 10, 2014
    Posts:
    76
    Hi!
    I have a.. um.. lets call it hammer, that is connected to some rigid body 2D. The hammer is rotating with some speed using motor. In some moment I want to stop rotating and freeze the hammer. I tried to set useMotor = false, but the hammer seems keeping rotating.. And it is not an inertia, because the rotation is slow and after switching off useMotor it keeps rotating with the same speed. I tried to use limits, this is not helped. I do not understand how to stop the hammer rotating.

    Hope for you guys!

    Thank you in advance.
     
  2. glad

    glad

    Joined:
    May 10, 2014
    Posts:
    76
    motorSpeed = 0 solved my problem.