public override void AgentReset() { Debug.Log("Resetting"); local_done = false; //pick new start and end defaultOrRandomizeSetStartEnd(); //temporary velocityControl.enabled = false; // randomness float startX = ((float)rand.NextDouble()) * (maxX - minX) + minX; float startZ = ((float)rand.NextDouble()) * (maxZ - minZ) + minZ; transform.position = new Vector3(startX, initialPos.y, startZ); transform.rotation = Quaternion.AngleAxis((float)(rand.NextDouble()) * 2.0f * 180.0f, Vector3.up); //reset, which also re enables //StartCoroutine (Waiting (1.0f)); //while (!wait) { //} GetComponent <Rigidbody>().isKinematic = false; velocityControl.Reset(); }
/// <inheritdoc /> public void Reset() { Basic.Reset(); Assign.Reset(); Amplifier.Reset(); Output.Reset(); Expression.Reset(); VelocityControl.Reset(); foreach (var wmt in Wmts) { wmt.Reset(); } Pitch.Reset(); Tvf.Reset(); Tva.Reset(); Other.Reset(); }