Browse Source

added sit ot audio manager

main
cailean 9 months ago
parent
commit
b3661c8286
  1. 8
      Assets/9_ML-Agents/Shared Assets MLA/SharedAssets/Scripts/GroundContact.cs
  2. 2
      Assets/ML-Agents/Timers/Beep_timers.json

8
Assets/9_ML-Agents/Shared Assets MLA/SharedAssets/Scripts/GroundContact.cs

@ -22,9 +22,11 @@ namespace Unity.MLAgentsExamples
public bool touchingObject; public bool touchingObject;
public bool touchingGround; public bool touchingGround;
public bool touchingStairs; public bool touchingStairs;
public bool touchingSit;
const string k_Ground = "ground"; // Tag of ground object. const string k_Ground = "ground"; // Tag of ground object.
const string k_Stairs = "stairs"; const string k_Stairs = "stairs";
const string k_Object = "object"; const string k_Object = "object";
const string k_Sit = "sit";
/// <summary> /// <summary>
/// Check for collision with ground, and optionally penalize agent. /// Check for collision with ground, and optionally penalize agent.
@ -77,6 +79,12 @@ namespace Unity.MLAgentsExamples
agent.AddReward(0.002f); agent.AddReward(0.002f);
} }
} }
if (col.transform.CompareTag(k_Sit))
{
if (isFoot)
AudioManager.instance.FootStepAudio(col.transform.position, col.relativeVelocity.magnitude, col.collider.sharedMaterial);
}
} }
void OnCollisionExit(Collision other) void OnCollisionExit(Collision other)

2
Assets/ML-Agents/Timers/Beep_timers.json

@ -1 +1 @@
{"count":1,"self":153.1486208,"total":154.141943,"children":{"InitializeActuators":{"count":1,"self":0.003343,"total":0.003343,"children":null},"InitializeSensors":{"count":1,"self":0.007436,"total":0.007436,"children":null},"AgentSendState":{"count":2532,"self":0.042360999999999996,"total":0.258511,"children":{"CollectObservations":{"count":507,"self":0.020662999999999997,"total":0.020662999999999997,"children":null},"WriteActionMask":{"count":507,"self":0.001255,"total":0.001255,"children":null},"RequestDecision":{"count":507,"self":0.194232,"total":0.194232,"children":null}}},"DecideAction":{"count":2532,"self":0.67316199999999993,"total":0.682284,"children":{"RayPerceptionSensor.Perceive":{"count":507,"self":0.009122,"total":0.009122,"children":null}}},"AgentAct":{"count":2532,"self":0.038203,"total":0.038203,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1710511561","unity_version":"2023.2.8f1","command_line_arguments":"\/Applications\/Unity\/Hub\/Editor\/2023.2.8f1\/Unity.app\/Contents\/MacOS\/Unity -projectpath \/Users\/scn\/Documents\/BB_Beauty & The Beep\/12 Unity\/git\/beep-final -useHub -hubIPC -cloudEnvironment production","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.3.0-exp.3","scene_name":"Beep","end_time_seconds":"1710511715"}} {"count":1,"self":24.587307199999998,"total":24.8853893,"children":{"InitializeActuators":{"count":1,"self":0.0020222,"total":0.0020222,"children":null},"InitializeSensors":{"count":1,"self":0.001508,"total":0.001508,"children":null},"AgentSendState":{"count":950,"self":0.0141855,"total":0.0448497,"children":{"CollectObservations":{"count":190,"self":0.0130963,"total":0.0130963,"children":null},"WriteActionMask":{"count":190,"self":0,"total":0,"children":null},"RequestDecision":{"count":190,"self":0.0175679,"total":0.0175679,"children":null}}},"DecideAction":{"count":950,"self":0.2391702,"total":0.241677,"children":{"RayPerceptionSensor.Perceive":{"count":190,"self":0.0025068,"total":0.0025068,"children":null}}},"AgentAct":{"count":950,"self":0.0080247,"total":0.0080247,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1710512164","unity_version":"2023.2.8f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2023.2.8f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\Projects\\24_02-Beep\\4_Unity\\Beep Final Git\\beep-final -useHub -hubIPC -cloudEnvironment production","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.3.0-exp.3","scene_name":"Beep","end_time_seconds":"1710512189"}}
Loading…
Cancel
Save