From 6ff9f0703ac1a61743d24ecfa43e581069887d2b Mon Sep 17 00:00:00 2001 From: cailean Date: Fri, 1 Mar 2024 13:55:44 +0000 Subject: [PATCH] added ikea tray physics --- .../Sections/Ikea Tray/Ikea Tray.prefab | 55 ++++++++++++++++++- Assets/6_Scenes/Beep.unity | 45 +++++++++++++-- Assets/ML-Agents/Timers/Beep_timers.json | 2 +- 3 files changed, 93 insertions(+), 9 deletions(-) diff --git a/Assets/1_House/Sections/Ikea Tray/Ikea Tray.prefab b/Assets/1_House/Sections/Ikea Tray/Ikea Tray.prefab index 9ed3f16..a848902 100644 --- a/Assets/1_House/Sections/Ikea Tray/Ikea Tray.prefab +++ b/Assets/1_House/Sections/Ikea Tray/Ikea Tray.prefab @@ -13,6 +13,8 @@ GameObject: - component: {fileID: 7203994896115532055} - component: {fileID: 5288517889105351542} - component: {fileID: 1054807629603338849} + - component: {fileID: 4976165892030850332} + - component: {fileID: 7349474699239487612} m_Layer: 0 m_Name: House Content|TAVA_L_BB_SpotMini-House_2023.blend|Dupli|57 m_TagString: object @@ -102,7 +104,7 @@ BoxCollider: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3137489168000597738} - m_Material: {fileID: 0} + m_Material: {fileID: 13400000, guid: 93802cd8fe539f74f8dbd1d4dbed72df, type: 2} m_IncludeLayers: serializedVersion: 2 m_Bits: 0 @@ -124,7 +126,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3137489168000597738} serializedVersion: 4 - m_Mass: 2 + m_Mass: 10 m_Drag: 0.05 m_AngularDrag: 0.05 m_CenterOfMass: {x: 0, y: 0, z: 0} @@ -141,8 +143,55 @@ Rigidbody: m_UseGravity: 1 m_IsKinematic: 0 m_Interpolate: 0 - m_Constraints: 0 + m_Constraints: 4 m_CollisionDetection: 0 +--- !u!114 &4976165892030850332 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3137489168000597738} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fbae295f3eff4ef4ca5fcf6954250d1e, type: 3} + m_Name: + m_EditorClassIdentifier: + m_CollisionEvent: + m_PersistentCalls: + m_Calls: [] + m_CollisionStayEvent: + m_PersistentCalls: + m_Calls: [] + m_CollisionExitEvent: + m_PersistentCalls: + m_Calls: [] + m_TriggerStayEvent: + m_PersistentCalls: + m_Calls: [] + m_TriggerExitEvent: + m_PersistentCalls: + m_Calls: [] + m_IsTouching: 0 + m_IsAttached: 0 + m_TrayTimeout: 10 + m_FixedJoint: {fileID: 0} +--- !u!138 &7349474699239487612 +FixedJoint: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3137489168000597738} + serializedVersion: 1 + m_ConnectedBody: {fileID: 0} + m_ConnectedArticulationBody: {fileID: 0} + m_BreakForce: Infinity + m_BreakTorque: Infinity + m_EnableCollision: 0 + m_EnablePreprocessing: 1 + m_MassScale: 1 + m_ConnectedMassScale: 1 --- !u!1 &4193632188597962485 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/6_Scenes/Beep.unity b/Assets/6_Scenes/Beep.unity index 048b5be..03bcc6f 100644 --- a/Assets/6_Scenes/Beep.unity +++ b/Assets/6_Scenes/Beep.unity @@ -250,8 +250,8 @@ MonoBehaviour: m_EditorClassIdentifier: m_Floor: {fileID: 13400000, guid: 52a249eaa894e35488a1519221a56769, type: 2} m_Agent: {fileID: 13400000, guid: f5a7d4c9dbe3163459d7f47025557652, type: 2} - m_Timer: 0 - m_TimerTray: 0 + m_Timer: 5 + m_TimerTray: 10 m_HasChanged: 0 --- !u!4 &259755219 stripped Transform: @@ -12195,17 +12195,17 @@ PrefabInstance: - target: {fileID: 2568189177871766882, guid: 4853d1f55d3aa3f4b9e207002deada10, type: 3} propertyPath: m_LocalPosition.x - value: 0 + value: -4.745 objectReference: {fileID: 0} - target: {fileID: 2568189177871766882, guid: 4853d1f55d3aa3f4b9e207002deada10, type: 3} propertyPath: m_LocalPosition.y - value: 0 + value: 1.365 objectReference: {fileID: 0} - target: {fileID: 2568189177871766882, guid: 4853d1f55d3aa3f4b9e207002deada10, type: 3} propertyPath: m_LocalPosition.z - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 2568189177871766882, guid: 4853d1f55d3aa3f4b9e207002deada10, type: 3} @@ -12242,6 +12242,41 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 4976165892030850332, guid: 4853d1f55d3aa3f4b9e207002deada10, + type: 3} + propertyPath: m_CollisionEvent.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4976165892030850332, guid: 4853d1f55d3aa3f4b9e207002deada10, + type: 3} + propertyPath: m_CollisionEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4976165892030850332, guid: 4853d1f55d3aa3f4b9e207002deada10, + type: 3} + propertyPath: m_CollisionEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 219793651} + - target: {fileID: 4976165892030850332, guid: 4853d1f55d3aa3f4b9e207002deada10, + type: 3} + propertyPath: m_CollisionEvent.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4976165892030850332, guid: 4853d1f55d3aa3f4b9e207002deada10, + type: 3} + propertyPath: m_CollisionEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: ActivateSlipperyTray + objectReference: {fileID: 0} + - target: {fileID: 4976165892030850332, guid: 4853d1f55d3aa3f4b9e207002deada10, + type: 3} + propertyPath: m_CollisionEvent.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: GroundManager, Assembly-CSharp + objectReference: {fileID: 0} + - target: {fileID: 4976165892030850332, guid: 4853d1f55d3aa3f4b9e207002deada10, + type: 3} + propertyPath: m_CollisionEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} - target: {fileID: 6414684785569884419, guid: 4853d1f55d3aa3f4b9e207002deada10, type: 3} propertyPath: m_Name diff --git a/Assets/ML-Agents/Timers/Beep_timers.json b/Assets/ML-Agents/Timers/Beep_timers.json index 45c5060..0acfbab 100644 --- a/Assets/ML-Agents/Timers/Beep_timers.json +++ b/Assets/ML-Agents/Timers/Beep_timers.json @@ -1 +1 @@ -{"count":1,"self":8.9747472,"total":9.0727733999999991,"children":{"InitializeActuators":{"count":1,"self":0.0019979999999999998,"total":0.0019979999999999998,"children":null},"InitializeSensors":{"count":1,"self":0.0020041,"total":0.0020041,"children":null},"AgentSendState":{"count":164,"self":0.0020036,"total":0.016597499999999998,"children":{"CollectObservations":{"count":33,"self":0.0020195,"total":0.0020195,"children":null},"WriteActionMask":{"count":33,"self":0.00050369999999999994,"total":0.00050369999999999994,"children":null},"RequestDecision":{"count":33,"self":0.0120707,"total":0.0120707,"children":null}}},"DecideAction":{"count":164,"self":0.0744064,"total":0.0744064,"children":{"RayPerceptionSensor.Perceive":{"count":33,"self":0,"total":0,"children":null}}},"AgentAct":{"count":164,"self":0.0020157,"total":0.0020157,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1709300669","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":"1709300678"}} \ No newline at end of file +{"count":1,"self":38.1027328,"total":38.697915699999996,"children":{"InitializeActuators":{"count":1,"self":0.0015126,"total":0.0015126,"children":null},"InitializeSensors":{"count":1,"self":0.0020038,"total":0.0020038,"children":null},"AgentSendState":{"count":1214,"self":0.0136207,"total":0.2929302,"children":{"CollectObservations":{"count":243,"self":0.0074198999999999992,"total":0.0074198999999999992,"children":null},"WriteActionMask":{"count":243,"self":0.0010341,"total":0.0010341,"children":null},"RequestDecision":{"count":243,"self":0.27085549999999997,"total":0.27085549999999997,"children":null}}},"DecideAction":{"count":1214,"self":0.2815834,"total":0.2866267,"children":{"RayPerceptionSensor.Perceive":{"count":243,"self":0.0050433,"total":0.0050433,"children":null}}},"AgentAct":{"count":1214,"self":0.0121106,"total":0.0121106,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1709301189","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":"1709301228"}} \ No newline at end of file