public override void OnDrawGizmos() { Gizmos.color = Color.yellow; Gizmos.DrawLine(boid.transform.position, boid.transform.position + (force)); CreatureManager.Log("Theta" + theta); CreatureManager.Log("Force" + force); }
// Update is called once per frame void Update() { theta = (harmonic.theta - (Mathf.PI / 2)) % (Mathf.PI * 2.0f); CreatureManager.Log("Harmonic theta:" + theta); if (theta < Mathf.PI) { boid.position += (boid.up * Mathf.Abs(theta) * 10); } }
// Update is called once per frame void Update() { if (harmonic != null) { float offset = rotationOffset * Mathf.Deg2Rad; angle = Mathf.Lerp(angle, Utilities.Map(Mathf.Sin((harmonic.theta + offset)), -1.0f, 1.0f, 1.0f, amplitude), Time.deltaTime); CreatureManager.Log("Scale: " + angle); transform.localScale = new Vector3( xAxis ? angle : 1 , yAxis ? angle : 1 , zAxis ? angle : 1 ); } }
// Update is called once per frame void Update() { CreatureManager.Log("Alive species: " + alive.Count); CreatureManager.Log("Suspended species: " + suspended.Count); }