Scan doesnt always work


I have the following code:

this.transform.rotate(new Vector3(0,90f,0));; //boxCollider is the collider attached to the objects transform.

This sometimes updates the graph (viewing in the editor) and sometimes doesnt - implying a timing issue (a coroutine?? in Astar).

The starting conditions (i.e. position/rotation of the transform) is always the same.

Has anybody else seen this problem?


This is likely because even though you rotate the object, the actual physics is not updated until the next FixedUpdate. So I would recommend that you perform the rotation in FixedUpdate (or you yield return new WaitForFixedUpdate()).