Search Unity

Collision detected, but colliders are quite far away.

Discussion in 'Physics' started by Erenquin, Dec 23, 2019.

  1. Erenquin

    Erenquin

    Joined:
    Apr 9, 2018
    Posts:
    164
    Hello,
    as you may guess I have an issue with collision detection. A collision is detected where it should not.
    The picture says it all.

    The ball (basic sphere) has a scale of 0.02.
    All physics settings are the default ones (especially contact offset is 0.01).

    The ball is going straight vertically.

    How to make it behave as expected ?
    I'm using Unity 2019.2.13f1

    upload_2019-12-23_17-33-16.png
     
  2. kmedved

    kmedved

    Joined:
    Aug 18, 2016
    Posts:
    189
    Does ball has child object that collide with it? Ball collides with capsule collider? What if you change scale to 1 and check it again?
     
  3. Erenquin

    Erenquin

    Joined:
    Apr 9, 2018
    Posts:
    164
    Thanks for the answer.

    No, the ball is a standard sphere, I only scaled it to 0.02.
    Yes it collides with the capsule collider.

    When it is spawned I add a force to it with a value of 3 so that it is launched vertically and then falls down.
    I noticed that if I reduce the force (to 2.5), the collision occurs less often, as if there is some kind of wind blowing when the ball passes.

    The collision occurs both when the ball is launched and when it falls back.

    As you suggest I will try with a standard cube and a scale of 1.

    To be noted that the collision of the ball with other part of the scene seems to be better, but maybe there is the same kind of issue.

    I was thinking, considering there is an offset of 0.01, which is half the size of the sphere, adding this offset to the sphere collider (to the right) and the capsule collider (to the left) may explain this.
     
  4. rojennnn96

    rojennnn96

    Joined:
    Dec 16, 2019
    Posts:
    2
    try to scale ur collider