- Added a slight rotation to the sphere

This commit is contained in:
Patrice Vignola 2015-08-12 12:00:00 -04:00
parent 8da5556915
commit d6f894d453
4 changed files with 9 additions and 2 deletions

View File

@ -260,6 +260,7 @@ MonoBehaviour:
SpherePrototype: {fileID: 140654, guid: 646dd6566f9e1374caa3af8ad37c43d3, type: 2}
PointsAmount: 400
SphereRadius: 7
rotationSpeed: .699999988
--- !u!1 &1126063559
GameObject:
m_ObjectHideFlags: 0

View File

@ -150,4 +150,4 @@ Material:
data:
first:
name: _TintColor
second: {r: .257352948, g: .10029196, b: .233522967, a: .501960814}
second: {r: .0901960805, g: .0823529437, b: .0862745121, a: .501960814}

View File

@ -7,6 +7,7 @@ public class Sphere : MonoBehaviour
public GameObject SpherePrototype;
public int PointsAmount = 50;
public float SphereRadius = 1f;
public float rotationSpeed = 0.7f;
private GameObject[] nodes;
@ -16,6 +17,11 @@ public class Sphere : MonoBehaviour
AssignLinks();
}
void Update()
{
transform.Rotate(Vector3.one * Time.deltaTime * rotationSpeed);
}
private void InstantiateNodes()
{
/* Sphere uniform distribution using the spiral method with the golden angle

View File

@ -26,7 +26,7 @@ Transform:
m_GameObject: {fileID: 140654}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -1.38999999, y: -.0725698322, z: -1.32421875}
m_LocalScale: {x: .100000001, y: .100000001, z: .100000001}
m_LocalScale: {x: .5, y: .5, z: .5}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0