Search Unity

Physics.Raycast misses randomly

Discussion in 'Physics' started by komatii, Jun 7, 2011.

Thread Status:
Not open for further replies.
  1. Liflex

    Liflex

    Joined:
    Feb 12, 2023
    Posts:
    1
    I had similar issue. It turned out my raycast origin was in a small cube with a box collider on it. The cube rotated and eventually the ray hit the box collider of the cube whoose transform I was using as an origin point. After deactivating the collider, which I didn't need anyway, the problem disappeared.
     
  2. TinyTeaOW

    TinyTeaOW

    Joined:
    Dec 3, 2018
    Posts:
    1
    thanks, the flat collider mentioned really helped me
     
Thread Status:
Not open for further replies.