Commit 5ccafe44 authored by Danial KordModanlou's avatar Danial KordModanlou

closest distance system updated

parent 27042952
......@@ -19,7 +19,6 @@
<Path>.vs</Path>
<Path>Library</Path>
<Path>Logs</Path>
<Path>Temp</Path>
<Path>obj</Path>
</explicitExcludes>
</component>
......
......@@ -3,7 +3,9 @@
<component name="ChangeListManager">
<list default="true" id="63a78b22-9aa4-4157-97bc-72b63425d4fc" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/.idea.car-sim-remaster/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.car-sim-remaster/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/scripts/DataSaver.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/scripts/DataSaver.cs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/CSV/p1.csv" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/CSV/p1.csv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/Scenes/SampleScene.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/SampleScene.unity" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Assets/scripts/Wall.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/scripts/Wall.cs" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
......@@ -28,27 +30,10 @@
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Assets/scripts/CarCustom.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="29" column="42" selection-start-line="29" selection-start-column="42" selection-end-line="29" selection-end-column="42" />
<folding>
<marker date="1593015316826" expanded="false" signature="6:127" ph="..." />
<marker date="1593015316826" expanded="true" signature="167:716" ph="{...}" />
<marker date="1593015316826" expanded="true" signature="194:299" ph="{...}" />
<marker date="1593015316826" expanded="true" signature="326:480" ph="{...}" />
<marker date="1593015316826" expanded="true" signature="510:561" ph="{...}" />
<marker date="1593015316826" expanded="true" signature="596:714" ph="{...}" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/Assets/scripts/DataSaver.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="101">
<caret line="147" column="43" selection-start-line="147" selection-start-column="35" selection-end-line="147" selection-end-column="43" />
<state relative-caret-position="1560">
<caret line="116" column="32" selection-start-line="116" selection-start-column="24" selection-end-line="116" selection-end-column="32" />
<folding>
<marker date="1593019093389" expanded="true" signature="7:181" ph="..." />
<marker date="1593019093389" expanded="true" signature="221:6834" ph="{...}" />
......@@ -83,7 +68,7 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Assets/TurnTheGameOn/IK Driver/Scripts/Utility/IKD_DemoController.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165">
<state relative-caret-position="150">
<caret line="13" column="15" selection-start-line="13" selection-start-column="15" selection-end-line="13" selection-end-column="15" />
<folding>
<marker date="1593017340585" expanded="true" signature="52:1148" ph="{...}" />
......@@ -101,21 +86,46 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/7559BF97-67E7-4FF5-906F-18401F66CD57/5d/8fb0f34f/MonoBehaviour.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="224">
<state relative-caret-position="2760">
<caret line="189" column="23" selection-start-line="189" selection-start-column="23" selection-end-line="189" selection-end-column="23" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/Assets/scripts/Wall.cs">
<provider selected="true" editor-type-id="text-editor">
<state>
<state relative-caret-position="450">
<caret line="48" column="116" selection-start-line="48" selection-start-column="116" selection-end-line="48" selection-end-column="116" />
<folding>
<marker date="1590237442152" expanded="false" signature="6:78" ph="..." />
<marker date="1590237442152" expanded="true" signature="153:555" ph="{...}" />
<marker date="1590237442152" expanded="true" signature="258:368" ph="{...}" />
<marker date="1590237442152" expanded="true" signature="415:553" ph="{...}" />
<marker date="1593096267047" expanded="true" signature="6:78" ph="..." />
<marker date="1593096267047" expanded="true" signature="153:1678" ph="{...}" />
<marker date="1593096267047" expanded="true" signature="258:414" ph="{...}" />
<marker date="1593096267047" expanded="true" signature="461:795" ph="{...}" />
<marker date="1593096267047" expanded="true" signature="841:1666" ph="{...}" />
<marker date="1593096267047" expanded="true" signature="1153:1413" ph="{...}" />
<marker date="1593096267047" expanded="true" signature="1293:1403" ph="{...}" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Assets/scripts/menuSystem.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="390">
<caret line="46" selection-start-line="46" selection-end-line="46" />
<folding>
<marker date="1588600760559" expanded="false" signature="6:100" ph="..." />
<marker date="1588600760559" expanded="true" signature="141:1280" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="466:487" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="545:986" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="597:971" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="643:792" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="809:960" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="1016:1278" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="1077:1168" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="1181:1272" ph="{...}" />
</folding>
</state>
</provider>
......@@ -434,6 +444,7 @@
<option value="$PROJECT_DIR$/Assets/scripts/CarCustom.cs" />
<option value="$PROJECT_DIR$/Assets/TurnTheGameOn/IK Driver/Scripts/Utility/IKD_DemoController.cs" />
<option value="$PROJECT_DIR$/Assets/scripts/DataSaver.cs" />
<option value="$PROJECT_DIR$/Assets/scripts/Wall.cs" />
</list>
</option>
</component>
......@@ -444,7 +455,7 @@
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="7">
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-10" />
<option name="y" value="130" />
<option name="width" value="1935" />
......@@ -456,6 +467,7 @@
</navigator>
<panes>
<pane id="FileSystemExplorer" />
<pane id="AssemblyExplorer" />
<pane id="UnityExplorer">
<option name="show-hidden-items" value="false" />
<option name="show-project-names" value="true" />
......@@ -463,7 +475,6 @@
<pane id="SolutionExplorer">
<option name="show-all-files" value="false" />
</pane>
<pane id="AssemblyExplorer" />
</panes>
</component>
<component name="PropertiesComponent">
......@@ -528,12 +539,13 @@
<workItem from="1592819922754" duration="7271000" />
<workItem from="1592844854491" duration="3361000" />
<workItem from="1593015133790" duration="186000" />
<workItem from="1593015568604" duration="2474000" />
<workItem from="1593015568604" duration="2851000" />
<workItem from="1593094252552" duration="2199000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="52869000" />
<option name="totallyTimeSpent" value="55445000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
......@@ -545,9 +557,9 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="-7" y="-7" width="1550" height="838" extended-state="7" />
<frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
<layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.30985916" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.31455398" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
......@@ -878,25 +890,44 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/scripts/menuSystem.cs">
<entry file="file://$PROJECT_DIR$/Assets/scripts/CarCustom.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="585">
<caret line="46" selection-start-line="46" selection-end-line="46" />
<state relative-caret-position="270">
<caret line="29" column="42" selection-start-line="29" selection-start-column="42" selection-end-line="29" selection-end-column="42" />
<folding>
<marker date="1588600760559" expanded="false" signature="6:100" ph="..." />
<marker date="1588600760559" expanded="true" signature="141:1280" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="466:487" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="545:986" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="597:971" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="643:792" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="809:960" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="1016:1278" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="1077:1168" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="1181:1272" ph="{...}" />
<marker date="1593015316826" expanded="false" signature="6:127" ph="..." />
<marker date="1593015316826" expanded="true" signature="167:716" ph="{...}" />
<marker date="1593015316826" expanded="true" signature="194:299" ph="{...}" />
<marker date="1593015316826" expanded="true" signature="326:480" ph="{...}" />
<marker date="1593015316826" expanded="true" signature="510:561" ph="{...}" />
<marker date="1593015316826" expanded="true" signature="596:714" ph="{...}" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/TurnTheGameOn/IK Driver/Scripts/Utility/IKD_DemoController.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="13" column="15" selection-start-line="13" selection-start-column="15" selection-end-line="13" selection-end-column="15" />
<folding>
<marker date="1593017340585" expanded="true" signature="52:1148" ph="{...}" />
<marker date="1593017340585" expanded="true" signature="103:1146" ph="{...}" />
<marker date="1593017340585" expanded="true" signature="411:1142" ph="{...}" />
<marker date="1593017340585" expanded="true" signature="566:597" ph="{...}" />
<marker date="1593017340585" expanded="true" signature="606:636" ph="{...}" />
<marker date="1593017340585" expanded="true" signature="724:849" ph="{...}" />
<marker date="1593017340585" expanded="true" signature="911:1037" ph="{...}" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/7559BF97-67E7-4FF5-906F-18401F66CD57/5d/8fb0f34f/MonoBehaviour.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2760">
<caret line="189" column="23" selection-start-line="189" selection-start-column="23" selection-end-line="189" selection-end-column="23" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/scripts/Warning.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
......@@ -1126,60 +1157,10 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/scripts/CarCustom.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="29" column="42" selection-start-line="29" selection-start-column="42" selection-end-line="29" selection-end-column="42" />
<folding>
<marker date="1593015316826" expanded="false" signature="6:127" ph="..." />
<marker date="1593015316826" expanded="true" signature="167:716" ph="{...}" />
<marker date="1593015316826" expanded="true" signature="194:299" ph="{...}" />
<marker date="1593015316826" expanded="true" signature="326:480" ph="{...}" />
<marker date="1593015316826" expanded="true" signature="510:561" ph="{...}" />
<marker date="1593015316826" expanded="true" signature="596:714" ph="{...}" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/scripts/Wall.cs">
<provider selected="true" editor-type-id="text-editor">
<state>
<folding>
<marker date="1590237442152" expanded="false" signature="6:78" ph="..." />
<marker date="1590237442152" expanded="true" signature="153:555" ph="{...}" />
<marker date="1590237442152" expanded="true" signature="258:368" ph="{...}" />
<marker date="1590237442152" expanded="true" signature="415:553" ph="{...}" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/7559BF97-67E7-4FF5-906F-18401F66CD57/5d/8fb0f34f/MonoBehaviour.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="224">
<caret line="189" column="23" selection-start-line="189" selection-start-column="23" selection-end-line="189" selection-end-column="23" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/TurnTheGameOn/IK Driver/Scripts/Utility/IKD_DemoController.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165">
<caret line="13" column="15" selection-start-line="13" selection-start-column="15" selection-end-line="13" selection-end-column="15" />
<folding>
<marker date="1593017340585" expanded="true" signature="52:1148" ph="{...}" />
<marker date="1593017340585" expanded="true" signature="103:1146" ph="{...}" />
<marker date="1593017340585" expanded="true" signature="411:1142" ph="{...}" />
<marker date="1593017340585" expanded="true" signature="566:597" ph="{...}" />
<marker date="1593017340585" expanded="true" signature="606:636" ph="{...}" />
<marker date="1593017340585" expanded="true" signature="724:849" ph="{...}" />
<marker date="1593017340585" expanded="true" signature="911:1037" ph="{...}" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/scripts/DataSaver.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="101">
<caret line="147" column="43" selection-start-line="147" selection-start-column="35" selection-end-line="147" selection-end-column="43" />
<state relative-caret-position="1560">
<caret line="116" column="32" selection-start-line="116" selection-start-column="24" selection-end-line="116" selection-end-column="32" />
<folding>
<marker date="1593019093389" expanded="true" signature="7:181" ph="..." />
<marker date="1593019093389" expanded="true" signature="221:6834" ph="{...}" />
......@@ -1210,5 +1191,40 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/scripts/menuSystem.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="390">
<caret line="46" selection-start-line="46" selection-end-line="46" />
<folding>
<marker date="1588600760559" expanded="false" signature="6:100" ph="..." />
<marker date="1588600760559" expanded="true" signature="141:1280" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="466:487" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="545:986" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="597:971" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="643:792" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="809:960" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="1016:1278" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="1077:1168" ph="{...}" />
<marker date="1588600760559" expanded="true" signature="1181:1272" ph="{...}" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Assets/scripts/Wall.cs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="450">
<caret line="48" column="116" selection-start-line="48" selection-start-column="116" selection-end-line="48" selection-end-column="116" />
<folding>
<marker date="1593096267047" expanded="true" signature="6:78" ph="..." />
<marker date="1593096267047" expanded="true" signature="153:1678" ph="{...}" />
<marker date="1593096267047" expanded="true" signature="258:414" ph="{...}" />
<marker date="1593096267047" expanded="true" signature="461:795" ph="{...}" />
<marker date="1593096267047" expanded="true" signature="841:1666" ph="{...}" />
<marker date="1593096267047" expanded="true" signature="1153:1413" ph="{...}" />
<marker date="1593096267047" expanded="true" signature="1293:1403" ph="{...}" />
</folding>
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -170,7 +170,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &362651535
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -755,6 +755,121 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 93ab9d7bcd8b80744ab77a800f1db95b, type: 3}
--- !u!1001 &911709159
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1093116804}
m_Modifications:
- target: {fileID: -4546720636104537858, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_Mesh
value:
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_LocalPosition.x
value: 152.94739
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_LocalPosition.y
value: -511
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_LocalPosition.z
value: 79.82196
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_LocalScale.x
value: 2
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_LocalScale.y
value: 2
objectReference: {fileID: 0}
- target: {fileID: -4216859302048453862, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_LocalScale.z
value: 1.425
objectReference: {fileID: 0}
- target: {fileID: -927199367670048503, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_Name
value: rah-shane
objectReference: {fileID: 0}
- target: {fileID: 47230535109714336, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2659090837685034640, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_LocalPosition.y
value: 138.2
objectReference: {fileID: 0}
- target: {fileID: 2977867299062781255, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_Convex
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5903998474558691662, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a24922c25d312c84fa08aaca5994f19f, type: 3}
--- !u!4 &911709160 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
m_PrefabInstance: {fileID: 911709159}
m_PrefabAsset: {fileID: 0}
--- !u!1 &921569260 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2202606020465897630, guid: 128c80cc77445014fb3f8deb2e41a075,
......@@ -868,6 +983,55 @@ Transform:
m_Father: {fileID: 2008584242}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1093116803
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1093116804}
m_Layer: 0
m_Name: GameObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1093116804
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1093116803}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -476.66888, y: 136.60072, z: -822.82196}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 911709160}
m_Father: {fileID: 0}
m_RootOrder: 18
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1142727743 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 5903998474558691662, guid: a24922c25d312c84fa08aaca5994f19f,
type: 3}
m_PrefabInstance: {fileID: 911709159}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1142727748
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1142727743}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 498ca4c8961158d47bf0a0bcbfd4d63e, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1204602373
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -1034,17 +1198,17 @@ PrefabInstance:
- target: {fileID: 2202606020465897624, guid: 128c80cc77445014fb3f8deb2e41a075,
type: 3}
propertyPath: m_LocalPosition.x
value: -25.987133
value: -302.8
objectReference: {fileID: 0}
- target: {fileID: 2202606020465897624, guid: 128c80cc77445014fb3f8deb2e41a075,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
value: 94.61
objectReference: {fileID: 0}
- target: {fileID: 2202606020465897624, guid: 128c80cc77445014fb3f8deb2e41a075,
type: 3}
propertyPath: m_LocalPosition.z
value: 24.457106
value: -381.07
objectReference: {fileID: 0}
- target: {fileID: 2202606020465897624, guid: 128c80cc77445014fb3f8deb2e41a075,
type: 3}
......@@ -1054,7 +1218,7 @@ PrefabInstance:
- target: {fileID: 2202606020465897624, guid: 128c80cc77445014fb3f8deb2e41a075,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
value: -0.9597563
objectReference: {fileID: 0}
- target: {fileID: 2202606020465897624, guid: 128c80cc77445014fb3f8deb2e41a075,
type: 3}
......@@ -1064,7 +1228,7 @@ PrefabInstance:
- target: {fileID: 2202606020465897624, guid: 128c80cc77445014fb3f8deb2e41a075,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
value: 0.28083423
objectReference: {fileID: 0}
- target: {fileID: 2202606020465897624, guid: 128c80cc77445014fb3f8deb2e41a075,
type: 3}
......@@ -1079,7 +1243,7 @@ PrefabInstance:
- target: {fileID: 2202606020465897624, guid: 128c80cc77445014fb3f8deb2e41a075,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
value: -147.38
objectReference: {fileID: 0}
- target: {fileID: 2202606020465897624, guid: 128c80cc77445014fb3f8deb2e41a075,
type: 3}
......@@ -1389,6 +1553,113 @@ Transform:
m_Father: {fileID: 2008584242}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1584725895
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1584725900}
- component: {fileID: 1584725899}
- component: {fileID: 1584725898}
- component: {fileID: 1584725897}
- component: {fileID: 1584725896}
m_Layer: 0
m_Name: Layer:0 1 (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1584725896
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1584725895}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 498ca4c8961158d47bf0a0bcbfd4d63e, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!64 &1584725897
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1584725895}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: -4058646288771621125, guid: a24922c25d312c84fa08aaca5994f19f, type: 3}
--- !u!23 &1584725898
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1584725895}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 6718947497816898733, guid: a24922c25d312c84fa08aaca5994f19f, type: 3}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &1584725899
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1584725895}
m_Mesh: {fileID: -4058646288771621125, guid: a24922c25d312c84fa08aaca5994f19f, type: 3}
--- !u!4 &1584725900
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1584725895}
m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalPosition: {x: -436.43915, y: -99.775925, z: 55.89276}
m_LocalScale: {x: 200, y: 142.50003, z: 200.00008}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 17
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1614892418
GameObject:
m_ObjectHideFlags: 0
......
......@@ -11,13 +11,45 @@ public class Wall : MonoBehaviour
void Start()
{
coll = this.GetComponent<MeshCollider>();
DataSaver.sideDistance = distanceToCar;
//DataSaver.sideDistance = distanceToCar;
DataSaver.sideDistance = newMethod;
}
public Vector3 distanceToCar(Vector3 car)
{
Vector3 closestPoint = coll.ClosestPointOnBounds(car);
Debug.Log(closestPoint);
car = transform.InverseTransformPoint(car);
Debug.Log(GetComponent<MeshCollider>().name);
Vector3 closestPoint = GetComponent<MeshCollider>().ClosestPointOnBounds(car);
Debug.Log("--> "+ car +" " +transform.TransformPoint(closestPoint));
return closestPoint;
}
public Vector3 newMethod(Vector3 point)
{
point = transform.InverseTransformPoint(point);
Mesh mesh = GetComponent<MeshFilter>().mesh;
float minDistanceSqr = Mathf.Infinity;
Vector3 nearestVertex = Vector3.zero;
// scan all vertices to find nearest
foreach (Vector3 vertex in mesh.vertices)
{
Vector3 diff = point-vertex;
float distSqr = diff.sqrMagnitude;
if (distSqr < minDistanceSqr)
{
minDistanceSqr = distSqr;
nearestVertex = vertex;
}
}
// convert nearest vertex back to world space
Debug.Log("--> "+ point +" " +minDistanceSqr + " " + transform.TransformPoint(nearestVertex));
return transform.TransformPoint(nearestVertex);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment