So I am spawning in a block called riverPiece (not in script) and its location and rotation are under riverBegin. I need to be able to change the rotation so that it is randomly either 90 or -90.
if(xzDecision == ("Z"))
{
riverBegin = Vector3((Random.value <= 0.5) ? 45 : -45, 0, Random.Range(-5,5) * 10);
}
else if(xzDecision == ("X"))
{
riverBegin = Vector3(Random.Range(-5,5) * 10, 0, (Random.value <= 0.5) ? 45 : -45);
}
I don’t know where to enter or what to enter for the rotation part of the script.