Hey Eric, the ? and : symbols are part of the ternary operator for a conditional expression. Essentially it’s a short hand way of writing an if / else statement.
Take the first tiltX float as an example:
float tiltX = (transform.eulerAngles.x < 180f) ? transform.eulerAngles.x : 360 - transform.eulerAngles.x;
The part before the ‘?’ ( (transform.eulerAngles.x < 180f) ) is the condition, to the left of the ‘:’ is the True expression, and to the right is the false expression.
//condition ? true_expression : false_expression;
Depending on the result of the condition, in this case the transform.eulerAngles.x being less then 180, tiltX is assigned either the transform.eulerAngle.x, or 360 minus the transform.eulerAngle.x.
For comparison, an alternate way of writing it as an if / else statement could look like this:
float tiltX = 0.0f;
if (transform.eulerAngles.x < 180f)
{
tiltX = transform.eulerAngles.x;
}
else
{
tiltX = 360 - transform.eulerAngles.x;
}
And the ‘||’, is the conditional-OR operator. Simply meaning if the left OR right expressions return true, the code inside the curly braces runs.
Hopefully this helps!