Updatre script
This commit is contained in:
parent
68b5175a37
commit
c2e955124d
@ -123,12 +123,19 @@ public class Main : MonoBehaviour
|
||||
for (int k = 0; k < rowsNumber * gridShiftZ; k += gridShiftZ)
|
||||
{
|
||||
Vector3 rotationVector = new Vector3(0, Random.Range(0.0f, 360.0f), 0);
|
||||
Vector3 rotationVectorShiftX = new Vector3(-90.0f, Random.Range(0.0f, 360.0f), 0);
|
||||
randomShiftX = random.Next(0, maxShiftValue);
|
||||
randomShiftZ = random.Next(0, maxShiftValue);
|
||||
GameObject tree = SelectRandomTree();
|
||||
|
||||
renderedTrees.Add(Instantiate(tree, new Vector3(i + positionShift_x + randomShiftX, 0, k + positionShift_z + randomShiftZ), Quaternion.Euler(rotationVector)));
|
||||
|
||||
if (tree.name.StartsWith("AS"))
|
||||
{
|
||||
renderedTrees.Add(Instantiate(tree, new Vector3(i + positionShift_x + randomShiftX, 0, k + positionShift_z + randomShiftZ), Quaternion.Euler(rotationVector)));
|
||||
}
|
||||
else
|
||||
{
|
||||
renderedTrees.Add(Instantiate(tree, new Vector3(i + positionShift_x + randomShiftX, 0, k + positionShift_z + randomShiftZ), Quaternion.Euler(rotationVectorShiftX)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user