Search Unity

sphere sitting in a tube - rotate tube, cause sphere to rotate on its z axis?

Discussion in 'Getting Started' started by Spectrum48K, Jul 16, 2018.

  1. Spectrum48K

    Spectrum48K

    Joined:
    Jul 13, 2018
    Posts:
    2
    I have a sphere sitting in a tube
    The sphere has a rigid body and sphere collider
    The tube has a rigid body and mesh collider

    When I rotate the tube on its z, I need this to cause the sphere to rotate on its z. Right now, the sphere just sits there motionless as the tube its sitting on merrily rotates on its z axis.

    Is there something within Unity I can use to achieve this naturally using Physics?
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    You could parent one to the other. Or you could connect them with a Joint.

    Just remember my motto: when you work with PhysX, be prepared for much wailing and gnashing of teeth.
     
    Spectrum48K likes this.
  3. Spectrum48K

    Spectrum48K

    Joined:
    Jul 13, 2018
    Posts:
    2
    thanks! I'll try those suggestions. Might try and hack it to by adding torque to the sphere on its z axis when in collision with the tube