herbou / Unity_PickerWheelUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sound timings are incorrect

0x7357 opened this issue · comments

pieceAngle = 360 / wheelPieces.Length ;

Because you used 360 and not 360f, the decimal numbers are rounded. This leads to the fact that the "half of a piece"-value is not correct.

With 7 Pieces, for example:
If I calculate "half of a piece" * 2 * 7, then the result is 357 and not 360. Accordingly, the sounds are no longer played correctly after several rotations.

Greetings
Danny