# Can Rotate - Allow arbitrary rotations - Degrees

It would be very helpful to me to have an option here that would set the unit’s reported degrees as 0 degrees in pointing toward the top of the game window and report the degrees facing as always relative from 0 to 359 degrees from a clock-wise direction no matter which direction the the units was rotated or what it’s previous direction was at start of the move and no matter how many times the unit is rotated more than 360 degrees in any direction, it would reset to 0 (or 359) upon passing the top of the window in rotation. In other words, it would be very useful to know from a fixed direction (toward the top of the map window, for example) how the unit is oriented so it can be compared to other unit’s facing. Thanks! Jim. (I find the current function of the Degrees property is not usable for determining the answers to my above programming needs.)

As a solution to your problem I suggest you:

1. define on each piece a market trait like Start_Degrees storing the initial orientation (degrees) compared to your required absolute zero (towards the top, say);

2. define a Calculated Property Absolute_Degrees equal to (Rotate_Degrees + Start_Degrees) % 360, where I assumed here Rotate was the name of your Can Rotate trait;

3. compare that among different pieces to achieve your purpose.