Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

tori (toruses) not being hollow

Discussion in 'World Building' started by TheIrishPizzaGuy, Jul 19, 2019.

  1. TheIrishPizzaGuy

    TheIrishPizzaGuy

    Joined:
    Jun 18, 2019
    Posts:
    6
    I know that by saying a hollow torus that would be a hole in the tube that is not what I mean.

    For my project I am trying to pass objects through the hole in the middle of the torus. However I am colliding with an invisible 2D like platform in the torus that is blocking this. I am new to Pro Builder and have been very frustrated over this and other things and can't figure out why and object with a hole in it, doesn't have a hole it in. I am sorry if I am missing something obvious here but for the life of me can't figure this one out. I can even balance the torus on a cylinder suspended by nothing. Again sorry if I am missing something, thank you for any help!
    ~Other notes~
    A separate issue that is occurring the Mesh Renderer and Mesh Collider are coming out of sync, therefore the floating torus is game view

    Under Pb_Entity (Script) there is a Custom Collider check box (that I dont know much about) but with it enabled none of the object has a collider.

    I could probably punch-out a shape but I think that there has to be a way

    Ideally we keep the tubes collider, and the inside gets removed along the shape of the torus, that way it could be like a hula hoop
     

    Attached Files:

  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    It's because you have Convex checked on the collider. Convex means the original collider gets rebuild such that it has no holes, and no concave portions. That's required by rigidbodies, so your approach of having a throwable ring won't really work like this.

    One suggestion is to remove the mesh collider on the object, and add some number of child objects containing box colliders, to roughly approximate the shape of the torus. However, that could result in weird physics behavior. But that's probably what I'd try.
     
    TheIrishPizzaGuy likes this.
  3. TheIrishPizzaGuy

    TheIrishPizzaGuy

    Joined:
    Jun 18, 2019
    Posts:
    6
    Hey thank you so much! I hate how dumb I didn't realize that, I will leave convex unchecked and apply a little gravity script to it. Thanks a ton!
     
  4. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    963
    Hi! Thanks @dgoyette for the help there :)

    I'd also like to add, you have the object marked as "Static" (upper-right checkbox in the inspector for the object). "Static" means (roughly) that it will never move or change. If you want it to fall or react to other physics encounters, you'll need to un-check "Static".

    Hope that helps! :)
     
  5. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    963