Can someone explain me why the following lines of code :
int myX = (int)transform.position.x;
int myZ = (int)transform.position.z;
Debug.Log("trxy= " + transform.position.x + ", " + transform.position.z + " myxz= " + myX + ", " + myZ);
are tracing me those results :
trxz= 25, 12 myxz= 25, 11
trxz= 30, 13 myxz= 30, 12
…
but on 40 traces, several are ok, example :
trxy= 15, 27 myxz= 15, 27
trxy= 27, 21 myxz= 27, 21
…
i’m loosing time on that one !