Search Unity

Raycasts Incorrect Hits

Discussion in 'Physics' started by gallenwolf, Apr 4, 2015.

  1. gallenwolf

    gallenwolf

    Joined:
    Mar 11, 2012
    Posts:
    118
    Hi all!
    I'm doing raycasts from 0,0.5,0, direction: vector3.forward with a short length of 0.35f.

    However, they *very occasionally* hitting moving kinematic rbd colliders that are moving below 0,0,0. (more accurately, these colliders are between -1 and 0 in world y).

    If I moved my raycast position up to 0.75f, it seemingly "fixes" the problem, but I'm very curious why a horizontal raycast could hit something half a meter away.

    Thanks!
     
  2. MortenSkaaning

    MortenSkaaning

    Joined:
    Jan 16, 2015
    Posts:
    120
    Hi gallenwolf,

    This does sound wrong indeed. Could you please submit a bug report with a reproduction project? Then we will get get around to look at it.

    Thanks