Browse Source

strating wp fixed

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

45
Assets/6_Scenes/Beep.unity

@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1 m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0} m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0} m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 18710.33, g: 22253.816, b: 24966.049, a: 1} m_IndirectSpecularColor: {r: 18716.479, g: 22260.361, b: 24973.613, a: 1}
m_UseRadianceAmbientProbe: 0 m_UseRadianceAmbientProbe: 0
--- !u!157 &3 --- !u!157 &3
LightmapSettings: LightmapSettings:
@ -234,7 +234,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.020231716, y: 0.97433764, z: -0.09769664, w: 0.20177281} m_LocalRotation: {x: 0.020231713, y: 0.97433764, z: -0.09769659, w: 0.20177285}
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
@ -320,7 +320,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.032237254, y: 0.9667706, z: -0.15567, w: 0.20020577} m_LocalRotation: {x: 0.032237247, y: 0.9667706, z: -0.15566996, w: 0.20020577}
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
@ -737,7 +737,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: 36, y: 24} m_SensorSize: {x: 1, y: 1}
Iso: 50 Iso: 50
ShutterSpeed: 0.0005 ShutterSpeed: 0.0005
Aperture: 2.2 Aperture: 2.2
@ -780,7 +780,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 377437129} m_GameObject: {fileID: 377437129}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: -0.037838772, y: 0.8817097, z: -0.071784794, w: -0.46476156} m_LocalRotation: {x: -0.03783877, y: 0.8817097, z: -0.07178479, w: -0.46476156}
m_LocalPosition: {x: -128.4, y: 13, z: -248.6} m_LocalPosition: {x: -128.4, y: 13, z: -248.6}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
@ -818,7 +818,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: 36, y: 24} m_SensorSize: {x: 1, y: 1}
Iso: 50 Iso: 50
ShutterSpeed: 0.0005 ShutterSpeed: 0.0005
Aperture: 1.9 Aperture: 1.9
@ -902,7 +902,7 @@ PrefabInstance:
- target: {fileID: 3364236482078802793, guid: 263d8cea838224448bdfd0e71bc2dce4, - target: {fileID: 3364236482078802793, guid: 263d8cea838224448bdfd0e71bc2dce4,
type: 3} type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 38.5 value: 8.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3364236482078802793, guid: 263d8cea838224448bdfd0e71bc2dce4, - target: {fileID: 3364236482078802793, guid: 263d8cea838224448bdfd0e71bc2dce4,
type: 3} type: 3}
@ -1212,8 +1212,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.161384, y: 0.08958591, z: -0.014712147, w: 0.9827071} m_LocalRotation: {x: 0.16138394, y: 0.08958586, z: -0.014712134, w: 0.9827071}
m_LocalPosition: {x: 9.394974, y: 28.732645, z: -5.0979614} m_LocalPosition: {x: 9.394974, y: -4.477354, z: -5.0979614}
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: []
@ -1334,7 +1334,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: 36, y: 24} m_SensorSize: {x: 1, y: 1}
Iso: 50 Iso: 50
ShutterSpeed: 0.0005 ShutterSpeed: 0.0005
Aperture: 2.2 Aperture: 2.2
@ -1377,8 +1377,8 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 513050371} m_GameObject: {fileID: 513050371}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0.17829923, y: -0.2236951, z: 0.041663464, w: 0.9573056} m_LocalRotation: {x: 0.17829934, y: -0.22369513, z: 0.041663498, w: 0.9573056}
m_LocalPosition: {x: 9.355881, y: 28.742643, z: -5.6164856} m_LocalPosition: {x: 9.355881, y: -4.467354, z: -5.6164856}
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:
@ -1415,7 +1415,7 @@ MonoBehaviour:
LensShift: {x: -0.21, y: 0.15} LensShift: {x: -0.21, y: 0.15}
GateFit: 1 GateFit: 1
FocusDistance: 10 FocusDistance: 10
m_SensorSize: {x: 36, y: 24} m_SensorSize: {x: 1, y: 1}
Iso: 50 Iso: 50
ShutterSpeed: 0.0005 ShutterSpeed: 0.0005
Aperture: 2.2 Aperture: 2.2
@ -1565,7 +1565,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: 36, y: 24} m_SensorSize: {x: 1, y: 1}
Iso: 50 Iso: 50
ShutterSpeed: 0.0005 ShutterSpeed: 0.0005
Aperture: 2.2 Aperture: 2.2
@ -2086,7 +2086,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: 9.394974, y: 28.732645, z: -5.0979614} m_LocalPosition: {x: 9.394974, y: -4.477354, z: -5.0979614}
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:
@ -2279,7 +2279,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.020202214, y: 0.97908413, z: -0.16078903, w: 0.12301628} m_LocalRotation: {x: 0.020202212, y: 0.9790842, z: -0.16078894, w: 0.12301633}
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
@ -2405,7 +2405,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: 1, y: 1} m_SensorSize: {x: 36, y: 24}
Iso: 50 Iso: 50
ShutterSpeed: 0.0005 ShutterSpeed: 0.0005
Aperture: 2.2 Aperture: 2.2
@ -2534,7 +2534,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: 1, y: 1} m_SensorSize: {x: 36, y: 24}
Iso: 50 Iso: 50
ShutterSpeed: 0.0005 ShutterSpeed: 0.0005
Aperture: 2.2 Aperture: 2.2
@ -2639,7 +2639,7 @@ PrefabInstance:
- target: {fileID: 5732046185206465305, guid: f03606b436da1d94e977c8ffa2825bd9, - target: {fileID: 5732046185206465305, guid: f03606b436da1d94e977c8ffa2825bd9,
type: 3} type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 32.07 value: -1.1399994
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5732046185206465305, guid: f03606b436da1d94e977c8ffa2825bd9, - target: {fileID: 5732046185206465305, guid: f03606b436da1d94e977c8ffa2825bd9,
type: 3} type: 3}
@ -3403,7 +3403,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: 1, y: 1} m_SensorSize: {x: 36, y: 24}
Iso: 50 Iso: 50
ShutterSpeed: 0.0005 ShutterSpeed: 0.0005
Aperture: 2.2 Aperture: 2.2
@ -3680,6 +3680,11 @@ PrefabInstance:
serializedVersion: 3 serializedVersion: 3
m_TransformParent: {fileID: 0} m_TransformParent: {fileID: 0}
m_Modifications: m_Modifications:
- target: {fileID: 841324076368356447, guid: 796c0c7bfd2e89547bd866eedcc6d386,
type: 3}
propertyPath: m_LocalPosition.y
value: -30
objectReference: {fileID: 0}
- target: {fileID: 1082572882027964806, guid: 796c0c7bfd2e89547bd866eedcc6d386, - target: {fileID: 1082572882027964806, guid: 796c0c7bfd2e89547bd866eedcc6d386,
type: 3} type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive

9
Assets/7_Scripts/Waypoint/WaypointManager.cs

@ -26,6 +26,8 @@ public class WaypointManager : MonoBehaviour
public Transform m_Agent; public Transform m_Agent;
private bool m_IsMoved;
public delegate void SwapModelOnReachingWaypoint(string modelName); public delegate void SwapModelOnReachingWaypoint(string modelName);
public static event SwapModelOnReachingWaypoint SwapModelOnWaypointReached; public static event SwapModelOnReachingWaypoint SwapModelOnWaypointReached;
@ -54,6 +56,11 @@ public class WaypointManager : MonoBehaviour
private void FixedUpdate() private void FixedUpdate()
{ {
if(!m_IsMoved)
{
MoveAgentToStartPosition();
m_IsMoved = true;
}
CheckOverride(); CheckOverride();
MoveTargetToWaypoint(); MoveTargetToWaypoint();
} }
@ -133,8 +140,6 @@ public class WaypointManager : MonoBehaviour
m_StartingPosition = wp.transform.position; m_StartingPosition = wp.transform.position;
} }
} }
MoveAgentToStartPosition();
m_WaypointList = m_WaypointList.OrderBy(waypoint => waypoint.m_Index).ToList(); m_WaypointList = m_WaypointList.OrderBy(waypoint => waypoint.m_Index).ToList();
} }

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

@ -1 +1 @@
{"count":1,"self":11.252796799999999,"total":11.580801,"children":{"InitializeActuators":{"count":1,"self":0.005272,"total":0.005272,"children":null},"InitializeSensors":{"count":1,"self":0.00919,"total":0.00919,"children":null},"AgentSendState":{"count":3,"self":0.009519,"total":0.053087999999999996,"children":{"CollectObservations":{"count":1,"self":0.0074709999999999993,"total":0.0074709999999999993,"children":null},"WriteActionMask":{"count":1,"self":0.000603,"total":0.000603,"children":null},"RequestDecision":{"count":1,"self":0.035495,"total":0.035495,"children":null}}},"DecideAction":{"count":3,"self":0.24103,"total":0.243493,"children":{"RayPerceptionSensor.Perceive":{"count":1,"self":0.002463,"total":0.002463,"children":null}}},"AgentAct":{"count":3,"self":0.013908,"total":0.013908,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1710425568","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":"1710425579"}} {"count":1,"self":27.303145599999997,"total":27.595079499999997,"children":{"InitializeActuators":{"count":1,"self":0.0005091,"total":0.0005091,"children":null},"InitializeSensors":{"count":1,"self":0.002005,"total":0.002005,"children":null},"AgentSendState":{"count":1087,"self":0.013060899999999999,"total":0.034155899999999996,"children":{"CollectObservations":{"count":218,"self":0.0030104,"total":0.0030104,"children":null},"WriteActionMask":{"count":218,"self":0.0009994,"total":0.0009994,"children":null},"RequestDecision":{"count":218,"self":0.0170852,"total":0.0170852,"children":null}}},"DecideAction":{"count":1087,"self":0.24373329999999999,"total":0.2452381,"children":{"RayPerceptionSensor.Perceive":{"count":218,"self":0.0015048,"total":0.0015048,"children":null}}},"AgentAct":{"count":1087,"self":0.009021,"total":0.009021,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1710426261","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":"1710426289"}}
Loading…
Cancel
Save