Browse Source

wp touched issue fixed

main
cailean 9 months ago
parent
commit
1f92165918
  1. 41
      Assets/6_Scenes/Beep.unity
  2. 8
      Assets/7_Scripts/Waypoint/Waypoint.cs
  3. 4
      Assets/7_Scripts/Waypoint/WaypointManager.cs
  4. 2
      Assets/ML-Agents/Timers/Beep_timers.json

41
Assets/6_Scenes/Beep.unity

@ -350,7 +350,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 83569712} m_GameObject: {fileID: 83569712}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: -0.092859626, y: 0.45725456, z: -0.04807753, w: -0.883167} m_LocalRotation: {x: -0.09285925, y: 0.45725608, z: -0.04807753, w: -0.8831663}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
@ -747,7 +747,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 155411616} m_GameObject: {fileID: 155411616}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: -0.15844774, y: 0.45239735, z: -0.082035385, w: -0.87378556} m_LocalRotation: {x: -0.15844734, y: 0.45239884, z: -0.08203552, w: -0.87378484}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
@ -1736,7 +1736,7 @@ MonoBehaviour:
LensShift: {x: 0, y: 0} LensShift: {x: 0, y: 0}
GateFit: 1 GateFit: 1
FocusDistance: 8.93528 FocusDistance: 8.93528
m_SensorSize: {x: 70.41, y: 52.63} m_SensorSize: {x: 1, y: 1}
Iso: 50 Iso: 50
ShutterSpeed: 0.0005 ShutterSpeed: 0.0005
Aperture: 2.2 Aperture: 2.2
@ -1865,7 +1865,7 @@ MonoBehaviour:
LensShift: {x: 0, y: 0} LensShift: {x: 0, y: 0}
GateFit: 1 GateFit: 1
FocusDistance: 0.01 FocusDistance: 0.01
m_SensorSize: {x: 70.41, y: 52.63} m_SensorSize: {x: 1, y: 1}
Iso: 50 Iso: 50
ShutterSpeed: 0.0005 ShutterSpeed: 0.0005
Aperture: 1.9 Aperture: 1.9
@ -2403,7 +2403,7 @@ Camera:
m_Iso: 50 m_Iso: 50
m_ShutterSpeed: 0.002 m_ShutterSpeed: 0.002
m_Aperture: 3.6 m_Aperture: 3.6
m_FocusDistance: 8.543994 m_FocusDistance: 8.544008
m_FocalLength: 35.000004 m_FocalLength: 35.000004
m_BladeCount: 5 m_BladeCount: 5
m_Curvature: {x: 26.748837, y: 32} m_Curvature: {x: 26.748837, y: 32}
@ -2445,8 +2445,8 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 470663197} m_GameObject: {fileID: 470663197}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.04618708, y: 0.9504154, z: -0.17234343, w: 0.25470608} m_LocalRotation: {x: 0.04618728, y: 0.950415, z: -0.17234302, w: 0.25470766}
m_LocalPosition: {x: 5.628662, y: -3.307354, z: 10.080261} m_LocalPosition: {x: 5.6286316, y: -3.307354, z: 10.080261}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
@ -2567,7 +2567,7 @@ MonoBehaviour:
LensShift: {x: 0, y: 0} LensShift: {x: 0, y: 0}
GateFit: 1 GateFit: 1
FocusDistance: 8.93528 FocusDistance: 8.93528
m_SensorSize: {x: 70.41, y: 52.63} m_SensorSize: {x: 1, y: 1}
Iso: 50 Iso: 50
ShutterSpeed: 0.0005 ShutterSpeed: 0.0005
Aperture: 2.2 Aperture: 2.2
@ -5061,7 +5061,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0 m_IsActive: 1
--- !u!4 &999681661 --- !u!4 &999681661
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -5348,7 +5348,7 @@ Transform:
m_GameObject: {fileID: 1124157896} m_GameObject: {fileID: 1124157896}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: -0, y: -0.97678393, z: -0, w: 0.21422696} m_LocalRotation: {x: -0, y: -0.97678393, z: -0, w: 0.21422696}
m_LocalPosition: {x: 5.628662, y: -3.307354, z: 10.080261} m_LocalPosition: {x: 5.6286316, y: -3.307354, z: 10.080261}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
@ -5693,7 +5693,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1178814724} m_GameObject: {fileID: 1178814724}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: -0.15844774, y: 0.45239738, z: -0.08203539, w: -0.87378556} m_LocalRotation: {x: -0.15844733, y: 0.45239887, z: -0.08203552, w: -0.87378484}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
@ -6207,7 +6207,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!4 &1357627196 --- !u!4 &1357627196
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -7016,6 +7016,11 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: 360 Projection Center value: 360 Projection Center
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 933460690407818085, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838, - target: {fileID: 933460690407818091, guid: 547378ae4bbaf4b4ba24e3243bcd0838,
type: 3} type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
@ -7825,7 +7830,7 @@ Transform:
m_GameObject: {fileID: 1803922973} m_GameObject: {fileID: 1803922973}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -12.190001, y: -31.56, z: 96.79} m_LocalPosition: {x: -12.73, y: -32.24, z: 99.17}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
@ -9588,6 +9593,16 @@ PrefabInstance:
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4487813433276970665, guid: 14d8283abcefffd4a916b8611ccd49fa,
type: 3}
propertyPath: m_LocalPosition.x
value: 3.095
objectReference: {fileID: 0}
- target: {fileID: 4487813433276970665, guid: 14d8283abcefffd4a916b8611ccd49fa,
type: 3}
propertyPath: m_LocalPosition.y
value: 3.054
objectReference: {fileID: 0}
- target: {fileID: 4648500137498506069, guid: 14d8283abcefffd4a916b8611ccd49fa, - target: {fileID: 4648500137498506069, guid: 14d8283abcefffd4a916b8611ccd49fa,
type: 3} type: 3}
propertyPath: m_Material propertyPath: m_Material

8
Assets/7_Scripts/Waypoint/Waypoint.cs

@ -23,7 +23,7 @@ public class Waypoint : MonoBehaviour
public delegate void WaypointReached(float index, string modelName); public delegate bool WaypointReached(float index, string modelName);
public static event WaypointReached OnWaypointReached; public static event WaypointReached OnWaypointReached;
@ -44,9 +44,13 @@ public class Waypoint : MonoBehaviour
private void CheckWaypoint() private void CheckWaypoint()
{ {
if (OnWaypointReached != null && !m_Touched) if (OnWaypointReached != null && !m_Touched)
{
//Debug.Log(OnWaypointReached);
if(OnWaypointReached(m_Index, m_ModelName))
{ {
m_Touched = true; m_Touched = true;
OnWaypointReached(m_Index, m_ModelName); }
} }
} }
} }

4
Assets/7_Scripts/Waypoint/WaypointManager.cs

@ -71,17 +71,19 @@ public class WaypointManager : MonoBehaviour
m_Target.position = wpPosition; m_Target.position = wpPosition;
} }
private void SetNextWaypoint(float index, string modelName) private bool SetNextWaypoint(float index, string modelName)
{ {
if (index == m_CurrentWaypoint.m_Index) if (index == m_CurrentWaypoint.m_Index)
{ {
Debug.Log($"Waypoint reached {index}"); Debug.Log($"Waypoint reached {index}");
MoveToNextWaypoint(index); MoveToNextWaypoint(index);
SwapModelOnWaypointReached(modelName); SwapModelOnWaypointReached(modelName);
return true;
} }
else else
{ {
Debug.Log($"Wrong Waypoint reached {index} Current {m_CurrentWaypoint.m_Index}"); Debug.Log($"Wrong Waypoint reached {index} Current {m_CurrentWaypoint.m_Index}");
return false;
} }
} }

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

@ -1 +1 @@
{"count":1,"self":5.697208,"total":5.7350933,"children":{"InitializeActuators":{"count":1,"self":0.000503,"total":0.000503,"children":null},"InitializeSensors":{"count":1,"self":0.001035,"total":0.001035,"children":null},"AgentSendState":{"count":2,"self":0.0005335,"total":0.0005335,"children":{"CollectObservations":{"count":1,"self":0,"total":0,"children":null},"WriteActionMask":{"count":1,"self":0,"total":0,"children":null},"RequestDecision":{"count":1,"self":0,"total":0,"children":null}}},"DecideAction":{"count":2,"self":0.034797499999999995,"total":0.034797499999999995,"children":{"RayPerceptionSensor.Perceive":{"count":1,"self":0,"total":0,"children":null}}},"AgentAct":{"count":2,"self":0.0010161,"total":0.0010161,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1711627013","unity_version":"2023.2.8f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2023.2.8f1\\Editor\\Unity.exe -projectpath C:\\Users\\Gebruiker\\Documents\\BB_BeautyBeep\\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":"1711627019"}} {"count":1,"self":139.73968639999998,"total":141.1434324,"children":{"InitializeActuators":{"count":1,"self":0.0015126,"total":0.0015126,"children":null},"InitializeSensors":{"count":1,"self":0.0025157,"total":0.0025157,"children":null},"AgentSendState":{"count":6683,"self":0.080923899999999993,"total":0.38008129999999996,"children":{"CollectObservations":{"count":1337,"self":0.0260379,"total":0.0260379,"children":null},"WriteActionMask":{"count":1337,"self":0,"total":0,"children":null},"RequestDecision":{"count":1337,"self":0.2731195,"total":0.2731195,"children":null}}},"DecideAction":{"count":6683,"self":0.9629264,"total":0.9669401,"children":{"RayPerceptionSensor.Perceive":{"count":1337,"self":0.0040136999999999994,"total":0.0040136999999999994,"children":null}}},"AgentAct":{"count":6683,"self":0.0516943,"total":0.0516943,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1711632623","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_3-Beep\\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":"1711632764"}}
Loading…
Cancel
Save