var tilt = Mathf.Abs(day-(YearLength/2))/(YearLength/2);

Where day is a number between 1 and YearLength. YearLength is any number. For some reason this always returns 0. Is this a bug? It should equal a number between 0 and 1 and testing it on paper it works. Making it just var tilt = Mathf.Abs(day-(YearLength/2)); makes it work so I have no idea whats going on.

Whenever you do division with float values, be sure to specify the denominator as a float.

var result = 1 / 2; // integer division truncates at the decimal point. 0.5 becomes 0
var result = 1 / 2f; // floating point division does not truncate and is left as 0.5f

Your variables are most likely both integers. This means there is no floating point calculation happening. You have to explicitly cast this by e.g. changing the 2’s to 2f’s