Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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.