I’ve learned that the Vector classes do not support null assignments in C#. What have you found to be the best representation for Vector nulls? (Something analogous to float.NaN or float.MinValue for float null stand-ins)
If you really need it to be null, you could use Vector3
as a nullable type (Vector3?
).
Since Best Practice sort of means “the way everyone else does it”: traditionally, you’d set x (or all three) to something like -9999. It was commonly understood that if(pos.x>-9999)
was a “does this exist?” test.