修改对焦位置

This commit is contained in:
huqibin 2025-05-22 19:44:44 +08:00
parent 95f650edf0
commit 6bf44db46f
3 changed files with 143 additions and 23 deletions

View File

@ -3117,6 +3117,28 @@ MeshCollider:
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: -1160307367571568844, guid: 543377e480fab384db837fbf32857c2e, type: 3}
--- !u!1 &1033494201 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: -4354579297971511379, guid: bb9c532ae1143d34d8245bbea5f5ce9b, type: 3}
m_PrefabInstance: {fileID: 1774722050}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1033494202
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1033494201}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f83afe5909cafd64aba66a84c659a2c6, type: 3}
m_Name:
m_EditorClassIdentifier:
fieldArea: {fileID: 1680383657}
randomRotate: 0
rowDistance: 5
strainDistance: 5
diseasedRate: 0
--- !u!1 &1037398674
GameObject:
m_ObjectHideFlags: 0
@ -3172,7 +3194,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1135868956}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.2677359, z: -0.09599137}
m_LocalPosition: {x: 0, y: 0.2677359, z: 0.80145013}
m_LocalScale: {x: 0.88070804, y: 0.88070816, z: 0.88070816}
m_ConstrainProportionsScale: 0
m_Children: []
@ -3410,6 +3432,24 @@ MeshCollider:
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: -4713564960810325214, guid: 543377e480fab384db837fbf32857c2e, type: 3}
--- !u!23 &1680383657 stripped
MeshRenderer:
m_CorrespondingSourceObject: {fileID: -3128490901855769185, guid: bb9c532ae1143d34d8245bbea5f5ce9b, type: 3}
m_PrefabInstance: {fileID: 1774722050}
m_PrefabAsset: {fileID: 0}
--- !u!65 &1680383658
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1033494201}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 109.05828, y: 0.48077422, z: 112.26411}
m_Center: {x: 30.234882, y: -0.14038047, z: 100.89003}
--- !u!1 &1742621343
GameObject:
m_ObjectHideFlags: 0
@ -3576,10 +3616,26 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8109040287526821490, guid: bb9c532ae1143d34d8245bbea5f5ce9b, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: -6874798098784929564, guid: bb9c532ae1143d34d8245bbea5f5ce9b, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: -6718103350785757407, guid: bb9c532ae1143d34d8245bbea5f5ce9b, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: bb9c532ae1143d34d8245bbea5f5ce9b, type: 3}
propertyPath: m_Name
value: "\u519C\u7530 (1)"
objectReference: {fileID: 0}
- target: {fileID: 4918415018653565539, guid: bb9c532ae1143d34d8245bbea5f5ce9b, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6742833846379967281, guid: bb9c532ae1143d34d8245bbea5f5ce9b, type: 3}
propertyPath: m_IsActive
value: 1
@ -3638,7 +3694,7 @@ BoxCollider:
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 114.35687, y: 0.20000686, z: 80.99066}
m_Size: {x: 112, y: 0.20000686, z: 77}
m_Center: {x: 36.978424, y: 0.00000074505806, z: -20.949902}
--- !u!114 &1838125877
MonoBehaviour:
@ -4812,7 +4868,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 93dcc543b6a0aa54c8eb58ff63a2342b, type: 3}
propertyPath: m_LocalPosition.z
value: 1
value: -0.019
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 93dcc543b6a0aa54c8eb58ff63a2342b, type: 3}
propertyPath: m_LocalRotation.w

View File

@ -23,13 +23,44 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 65285950724923400}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -0.13300323}
m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0.13300325, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 963909014448707086}
m_RootOrder: 2
m_Father: {fileID: 786660271681591661}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &960387145967871156
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7044083232139504358}
m_Layer: 0
m_Name: highPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7044083232139504358
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 960387145967871156}
m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0.133, z: 1.746}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 786660271097455140}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &963909014448707081
GameObject:
@ -41,7 +72,7 @@ GameObject:
m_Component:
- component: {fileID: 963909014448707086}
- component: {fileID: 6594386118979159493}
- component: {fileID: 644732198677733951}
- component: {fileID: 4258570619904434678}
m_Layer: 0
m_Name: "\u9AD8\u7CB1\u9884\u5236\u4F53"
m_TagString: Untagged
@ -63,8 +94,6 @@ Transform:
m_Children:
- {fileID: 786660271097455140}
- {fileID: 786660271681591661}
- {fileID: 869638176128357979}
- {fileID: 2271436771247917081}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -87,7 +116,7 @@ MonoBehaviour:
HealthyStrain: {fileID: 117401409998911646}
State: 0
RandomRotate: 1
--- !u!65 &644732198677733951
--- !u!65 &4258570619904434678
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -98,8 +127,8 @@ BoxCollider:
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 0.5, y: 2, z: 0.5}
m_Center: {x: 0, y: 1, z: 0}
m_Size: {x: 0.6, y: 1.84, z: 0.6}
m_Center: {x: 0, y: 0.92, z: 0}
--- !u!1 &5495461739195588011
GameObject:
m_ObjectHideFlags: 0
@ -123,13 +152,44 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5495461739195588011}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 2.117, z: -0.133}
m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0.133, z: 1.726}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 963909014448707086}
m_RootOrder: 3
m_Father: {fileID: 786660271681591661}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &7109179935888025109
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3427949124875803762}
m_Layer: 0
m_Name: lowPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3427949124875803762
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7109179935888025109}
m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0.13300325, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 786660271097455140}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &963909013790211718
PrefabInstance:
@ -184,7 +244,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 51c3521496de1854697d5682cc43afe5, type: 3}
propertyPath: m_Name
value: "\u9AD8\u7CB1\u75C5\u682A"
value: "\u9AD8\u7CB1"
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 51c3521496de1854697d5682cc43afe5, type: 3}
propertyPath: m_IsActive
@ -257,6 +317,10 @@ PrefabInstance:
propertyPath: m_Name
value: "\u9AD8\u7CB1"
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0fc9aae39f3b8fd45959b9f2e382a854, type: 3}
--- !u!1 &117401409998911646 stripped

View File

@ -66,7 +66,7 @@ public class RangeFinding : MonoBehaviour
{
posTwo = Input.mousePosition;
if (Physics.Raycast(ray2, out hit2, 1000) && posOne == posTwo)
if (Physics.Raycast(ray2, out hit2, 1000))
{
if (hit2.collider.gameObject.GetComponent<SorghumController>() == null)
return;
@ -98,16 +98,16 @@ public class RangeFinding : MonoBehaviour
if (Sorg_posOne == Sorg_posTwo)
{
Transform low_P = Sorg_posOne.transform.Find("lowPoint");
Transform high_P = Sorg_posOne.transform.Find("highPoint");
Transform low_P = Sorg_posOne.transform.Find("高粱/lowPoint");
Transform high_P = Sorg_posOne.transform.Find("高粱/highPoint");
myDistanceObj.transform.GetChild(0).position = low_P.position;
myDistanceObj.transform.GetChild(1).position = high_P.position;
}
else
{
Transform low_P = Sorg_posTwo.transform.Find("highPoint");
Transform high_P = Sorg_posOne.transform.Find("highPoint");
Transform low_P = Sorg_posTwo.transform.Find("高粱/highPoint");
Transform high_P = Sorg_posOne.transform.Find("高粱/highPoint");
myDistanceObj.transform.GetChild(0).position = low_P.position;
myDistanceObj.transform.GetChild(1).position = high_P.position;
}