merging
This commit is contained in:
commit
b8e127f435
@ -8,6 +8,7 @@ public class Main : MonoBehaviour
|
|||||||
{
|
{
|
||||||
#region Constants
|
#region Constants
|
||||||
string capturedFramesPath;
|
string capturedFramesPath;
|
||||||
|
readonly bool mixedScene = false;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Camera GUI fields
|
#region Camera GUI fields
|
||||||
@ -122,11 +123,11 @@ public class Main : MonoBehaviour
|
|||||||
{
|
{
|
||||||
for (int k = 0; k < rowsNumber * gridShiftZ; k += gridShiftZ)
|
for (int k = 0; k < rowsNumber * gridShiftZ; k += gridShiftZ)
|
||||||
{
|
{
|
||||||
Vector3 rotationVector = new Vector3(0, Random.Range(0.0f, 360.0f), 0);
|
GameObject tree = SelectRandomTree();
|
||||||
Vector3 rotationVectorShiftX = new Vector3(-90.0f, Random.Range(0.0f, 360.0f), 0);
|
float xRotation = tree.name.StartsWith("AS") ? 0.0f : -90.0f;
|
||||||
|
Vector3 rotationVector = new Vector3(xRotation, Random.Range(0.0f, 360.0f), 0);
|
||||||
randomShiftX = random.Next(0, maxShiftValue);
|
randomShiftX = random.Next(0, maxShiftValue);
|
||||||
randomShiftZ = random.Next(0, maxShiftValue);
|
randomShiftZ = random.Next(0, maxShiftValue);
|
||||||
GameObject tree = SelectRandomTree();
|
|
||||||
|
|
||||||
if (tree.name.StartsWith("AS") || tree.name.StartsWith("EU"))
|
if (tree.name.StartsWith("AS") || tree.name.StartsWith("EU"))
|
||||||
{
|
{
|
||||||
@ -142,7 +143,7 @@ public class Main : MonoBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GameObject duzySKurwol = Instantiate(tree, new Vector3(i + positionShift_x + randomShiftX, 0, k + positionShift_z + randomShiftZ), Quaternion.Euler(rotationVectorShiftX));
|
GameObject duzySKurwol = Instantiate(tree, new Vector3(i + positionShift_x + randomShiftX, 0, k + positionShift_z + randomShiftZ), Quaternion.Euler(rotationVector));
|
||||||
duzySKurwol.transform.localScale = new Vector3(0.05f, 0.05f, 0.05f);
|
duzySKurwol.transform.localScale = new Vector3(0.05f, 0.05f, 0.05f);
|
||||||
renderedTrees.Add(duzySKurwol);
|
renderedTrees.Add(duzySKurwol);
|
||||||
}
|
}
|
||||||
@ -150,7 +151,10 @@ public class Main : MonoBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
capturedFramesPath = Path.Combine(Application.dataPath, "..", "..", "Trees", tree1.name);
|
capturedFramesPath = Path.Combine(Application.dataPath, "..", "..", "Trees", tree1.name);
|
||||||
|
if (mixedScene)
|
||||||
|
{
|
||||||
|
capturedFramesPath = Path.Combine(capturedFramesPath, "mixed");
|
||||||
|
}
|
||||||
if (!Directory.Exists(capturedFramesPath))
|
if (!Directory.Exists(capturedFramesPath))
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(capturedFramesPath);
|
Directory.CreateDirectory(capturedFramesPath);
|
||||||
|
Loading…
Reference in New Issue
Block a user