September 2010
Beginner
384 pages
8h 49m
English
Let's lay down some code to make those half-circle pieces rotate.
GUI.DrawTexture(clockRect, back, ScaleMode.StretchToFill, true, 0);
if(isPastHalfway)
{
} else {
}
centerPoint. Draw the right side half-circle piece on top of the rotated GUI. Then, rotate the GUI back to its start position.if(isPastHalfway)
{
}
else
{
GUIUtility.RotateAroundPivot(-rot, centerPoint);
GUI.DrawTexture(clockRect, rightSide, ScaleMode.StretchToFill, true, 0);
GUI.matrix = startMatrix;
}
Read now
Unlock full access