Hi,
I have a puzzle block, that I want to check if its rotation equals 180 degrees on the y-axis.
if(puzzleblocks[0].transform.localEulerAngles.y == Vector3(0.0,180.0,0.0)) {
print("block 1 turned");
}
I also tried:
if(puzzleblocks[0].transform.localEulerAngles.y == 180) {
print("block 1 turned");
}
both to no result, it just wont print the line.
any help would be appreciated, thanks in advance
edit: I used localEulerangles, because it is a child of the Main Camera