Search Unity

[SOLVED] Capsule collider falls through the box collider

Discussion in 'Physics' started by emin_chernov, Nov 25, 2017.

  1. emin_chernov

    emin_chernov

    Joined:
    Jul 10, 2017
    Posts:
    9
    Hello everyone, i'm confused about following issue:

    1) I have a wall with box collider
    2) I have a capsule with capsule collider
    3) Capsule have rigid body on it
    4) All colliders perfectly fits corresponding meshes

    But when the capsule is moving towards the wall it's "facing part" falls through the wall (see screenshot).
    Is it unity's bug of feature?

    2017-11-25_13-35-24.png
    This is capsule settings:
    2017-11-25_13-44-08.png


    Any ideas?
     
  2. emin_chernov

    emin_chernov

    Joined:
    Jul 10, 2017
    Posts:
    9
    I'v faced aforementioned problem with 3d character, and it looks even worse:
    2017-11-25_13-49-02.png
     
  3. EnokV

    EnokV

    Joined:
    Apr 14, 2016
    Posts:
    56
    How are you moving the character? If you're moving it directly through transform you'll run into issues like this.

    Rigidbodies respond to forces(and in reality, aren't ideal for characters).

    Either manipulate the velocity property of the rigidbody, or use rigidbody.AddForce().

    Even with those methods, tunneling may happen at high velocity, but can be prevented by enabling continous collision detection on the rigidbody.
     
  4. emin_chernov

    emin_chernov

    Joined:
    Jul 10, 2017
    Posts:
    9
    >> How are you moving the character?
    Via translation.

    >> Either manipulate the velocity property of the rigidbody, or use rigidbody.AddForce().
    Interesting - i'll try this.

    Thank you!
     
  5. emin_chernov

    emin_chernov

    Joined:
    Jul 10, 2017
    Posts:
    9
    >> Either manipulate the velocity property of the rigidbody, or use rigidbody.AddForce().

    It works great! Thanks a lot!