Search Unity

Question Turning a crank on a plane turns the whole plane.

Discussion in 'Physics' started by Kobaltic1, Aug 6, 2021.

  1. Kobaltic1

    Kobaltic1

    Joined:
    Jan 22, 2015
    Posts:
    183
    I have a VR project.
    I have a plane.
    I have a crank that you turn by hand on the plane.
    I have a hinge joint on the crank and it attaches to the plane.
    Both the plane and the crank has rigidbodies.
    When I turn the crank the whole plane turns. This is not what I want.
    The hinge joint velocity of the crank determines the amount of thrust. This works.
    If I freeze the rotation axes it solves the problem. The next issue is that when I do need to move the plane, such as adding pitch, I unfreeze that axis but then the whole plane turns from the crank.
    Also if I unfreeze two axes at the same time then the plane goes spinning all around.
    I am not sure how to fix it so the crank doesn't turn the plane.
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,566
    The simplest thing to do would be to make the crank non-rigidbody, but a purely visual object. You don't need physics to spin it.

    If you're applying velocity to the hinge, then the hinge will spin BOTH objects it is attached to. If it can spin both the crank and the plane, it means one of those objects has incorrect mass. So it is highly likely that either your plan has a mass of 1kg, or the crank has a mass of 1 ton.
     
  3. Kobaltic1

    Kobaltic1

    Joined:
    Jan 22, 2015
    Posts:
    183
    Thanks for the reply. I need a rigidbody on the crank. If I don't I can't grab it in VR.
    I am not appling a force through code to the hinge. It is me moving my arm to apply the force.
    I have both the plane and crank set to 10. If I set the plane any higher it just flies out into space and a very high rate of speed.