Search Unity

Rigidbodies and Mesh Colliders

Discussion in 'Physics' started by wantondalliance, Dec 6, 2018.

  1. wantondalliance

    wantondalliance

    Joined:
    Aug 22, 2018
    Posts:
    34
    Hiyo,

    I want to get a ball rolling along this spiral rail. I'm aware that MeshColliders are expensive and non-convex ones are quite restrictive.

    In the example here, the behaviour is quite unpredictable and inconsistent. For a situation like this, what might help? Am I better off temporarily locking the ball to a spline instead, thus essentially faking it? Or maybe chaining box colliders together instead?

     
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,537
    yup
     
    SparrowGS and hippocoder like this.
  3. wantondalliance

    wantondalliance

    Joined:
    Aug 22, 2018
    Posts:
    34
    Quick, concise, I like it
     
  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You can do it quite well with latest 2018.3 version of Unity with some good knowledge of settings, a high physics update rate and some tweaking of settings. But this would pretty much require you to use multiple physics scenes as the settings for Physx to become stable would be rather expensive, and thus you'd want to isolate it from other physics (again a new feature in.3)

    So I'd 100% go with LaneFox ;)
     
  5. wantondalliance

    wantondalliance

    Joined:
    Aug 22, 2018
    Posts:
    34
    Hmm thanks for the tip. I'll look into that. This is meant to work on mobile, so perhaps even more of a reason to fake it as such. Cheers.
     
  6. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yeah and it will be less dev time just having a result rather than R&D... so yep, can be done. Nope, not cost effective to bother here it seems :)
     
  7. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    If it indistinguishable to the player and the "fake" solution costs less, use it.

    if i want a hovering platform with a jet under it i can use AddForce with rigidbodies and calculate what force i need to keep it level, or i can just make it static at the wanted height