how write correctly??
if (direction.x * direction.x > directio.x * directio.x)
{
direction.x = null; //(do not use)
}
if (direction.x * direction.x < directio.x * directio.x)
{
directio.x = null;//same
}
Writting correctly what?
What data type is x? You have also misspellings.
because it said"
Cannot convert null to ‘float’ because it is a non-nullable value type
"
You need set float as 0. Not null. It is numeric data type.
Objects can be set as null. However, it isn’t recommended.
ok,thanks, but other ways to do not use the vector.direction???
If that’s a typo and the n is missing, what is this comparison then?
if (direction.x * direction.x > directio.x * directio.x)