Search Unity

What type of collider should i use?

Discussion in 'Getting Started' started by Griftenatt, Feb 17, 2017.

  1. Griftenatt

    Griftenatt

    Joined:
    Mar 27, 2015
    Posts:
    15
    Hi,

    I have a cylinder spinning and i want the edges to have colliders, a character should be able to be inside the cylinder.
    I have tried the mesh-collider, kinda work but my character are able to move trough the collider somtimes.

    Any tips?

    /Jeppe
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    If you've created your own 3D model for your container object and the mesh isn't too complex, using a mesh-collider is probably the right way to go. If you're clipping through the shape somehow, ensure your normals are correct on all the faces. Narrow down where the clipping is occurring and how to reproduce it. Watch the trouble areas in Scene view while playing, and inspect the colliders and physics bodies to make sure they're acting as you expect. Put some debug raycasting in for impact points and see where things are slipping up and letting you fall through.
     
    Kiwasi and SarfaraazAlladin like this.
  3. SarfaraazAlladin

    SarfaraazAlladin

    Joined:
    Dec 20, 2013
    Posts:
    280
    A+ advice from Schneider21. Also, the speed you are moving + the speed of the spinning collider mat be causing the problem. Check to see if you can pass through your collider when the cylinder is still.