Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Ball Joint / Physics Collider Questions

Discussion in 'Editor & General Support' started by Cameron_SM, Jun 1, 2009.

  1. Cameron_SM

    Cameron_SM

    Joined:
    Jun 1, 2009
    Posts:
    915
    New Unity user here. I've trying to build a robot character that is controlled by adding torque forces to a simple sphere rigidbody. Basically just a ball rolling around. I have that part working and controlling great but I hit a snag when trying to add additional collision geometry to this.

    As the ball moves by torque/rotational forces, anything I parent to it spins around like crazy. What I want to add additional collision geometry that kind of hovers above that rolling sphere (like a head above a sphere-type-wheel) which also effects it's physics/velocity when/if it collides with something.

    I've toyed around with physics joints, and what I want would be akin to a rigid body with a free-rotating 360 degree ball joint under it but I can't find one that will let the ball still rotate freely without wildly rotating and dragging the other rigid bodies behind it.

    In short, is there a way to setup a joint in Unity that will let a rigidbody sphere with full 360 degree rotation act like a wheel attached to another rigid body?
     
    Raptosauru5 likes this.
  2. Raptosauru5

    Raptosauru5

    Joined:
    Feb 8, 2019
    Posts:
    24
    I have the same question here in 2019. This seems like rather complex problem and the only way I found is to cheat it with complicated script using AddForce and play with physics collider settings until it looks realistic (still doesn't).

    I would be happy if this question was raised higher, because it seems like Unity doesn't really have easy solution for this yet
     
  3. vfxjex

    vfxjex

    Joined:
    Jun 3, 2013
    Posts:
    93