Search Unity

[Unity 4.6.2] Odd intermittent Raycast Bug?

Discussion in 'Editor & General Support' started by Arowx, Feb 4, 2015.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Getting a really odd raycast bug, it looks as though the cast works then when the player moves the cast fails?

    PS. Raised a Bug Report 669611

    But wondering if anyone else has bumped into this problem and solved it (pun intended)?
     
  2. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    OK I was using a turn based mechanic and the characters would move when triggered in Update() by player input. This would then call the enemy players to move and then do a LOS / raycast test.

    Now sometimes the test was working and sometimes it was failing.

    But moving the LOS test to the next frame fixed it.

    ODD bug???