修改工具间滚轮无法使用问题、新增碰撞器
This commit is contained in:
parent
e98598bae3
commit
2876bb1c44
|
@ -10195,8 +10195,8 @@ BoxCollider:
|
|||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.017715812, y: 0.7307945, z: 0.95005375}
|
||||
m_Center: {x: 0.027794212, y: -0.3566327, z: 0.0007122159}
|
||||
m_Size: {x: 0.008652419, y: 0.7307945, z: 0.95005375}
|
||||
m_Center: {x: 0.023262516, y: -0.3566327, z: 0.0007122159}
|
||||
--- !u!114 &4094150410768700923
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -372,6 +372,7 @@ public class FirstPersonController : MonoBehaviour
|
|||
|
||||
|
||||
|
||||
|
||||
if (enableHeadBob)
|
||||
{
|
||||
HeadBob();
|
||||
|
|
|
@ -2962,6 +2962,20 @@ GameObject:
|
|||
m_CorrespondingSourceObject: {fileID: 322936463316669892, guid: e6024f57cedac6a40be3574b2630b881, type: 3}
|
||||
m_PrefabInstance: {fileID: 63043090}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!64 &64371149
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 538720368}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 7748153485848579490, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
--- !u!1 &69821958
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -8271,6 +8285,20 @@ MeshFilter:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 240386980}
|
||||
m_Mesh: {fileID: -6233374297163755596, guid: d6187d5c5284e6241bed7be6c0b0f50d, type: 3}
|
||||
--- !u!64 &240681992
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 538720363}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: -598941293045984150, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
--- !u!114 &241422259
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -11571,6 +11599,19 @@ MeshFilter:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 346999589}
|
||||
m_Mesh: {fileID: 7513932590641533987, guid: d6187d5c5284e6241bed7be6c0b0f50d, type: 3}
|
||||
--- !u!65 &348036455
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 538720362}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 19.360292, y: 7.971414, z: 7.0737906}
|
||||
m_Center: {x: 0.000015258787, y: -0.000009536743, z: -0.00000011920929}
|
||||
--- !u!1001 &348078865
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -19000,6 +19041,20 @@ Transform:
|
|||
m_Father: {fileID: 647771132}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!64 &536233978
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 538720365}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 7825003527710353973, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
--- !u!1001 &538717554
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -19238,6 +19293,10 @@ PrefabInstance:
|
|||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -7252984113429599143, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -7252984113429599143, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
|
@ -19590,6 +19649,10 @@ PrefabInstance:
|
|||
propertyPath: m_StaticEditorFlags
|
||||
value: 18
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -2099253951683324792, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -2099253951683324792, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
|
@ -19698,6 +19761,10 @@ PrefabInstance:
|
|||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -304876638058187421, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: -304876638058187421, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
|
@ -19870,6 +19937,10 @@ PrefabInstance:
|
|||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1894029799878150883, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1894029799878150883, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
|
@ -20078,6 +20149,10 @@ PrefabInstance:
|
|||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6005652620711740599, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6005652620711740599, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
|
@ -20336,6 +20411,144 @@ MeshCollider:
|
|||
m_Convex: 0
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: -6728982132790891716, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
--- !u!1 &538720362 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: -2311735511310139658, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
m_PrefabInstance: {fileID: 538720358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &538720363 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 8391514969557081066, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
m_PrefabInstance: {fileID: 538720358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &538720364 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: -6491028119049784639, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
m_PrefabInstance: {fileID: 538720358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &538720365 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 4856312353940520525, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
m_PrefabInstance: {fileID: 538720358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &538720366 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: -6825309513462761424, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
m_PrefabInstance: {fileID: 538720358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &538720367 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: -3182797009945855797, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
m_PrefabInstance: {fileID: 538720358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &538720368 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 2688327174255660275, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
m_PrefabInstance: {fileID: 538720358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &538720369 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: -6136491150099065454, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
m_PrefabInstance: {fileID: 538720358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &538720370 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 3177676906395613278, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
m_PrefabInstance: {fileID: 538720358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &538720371 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 1180863410084015532, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
m_PrefabInstance: {fileID: 538720358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &538720372 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 6900065131349530212, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
m_PrefabInstance: {fileID: 538720358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &538720373 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 1295647244915940989, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
m_PrefabInstance: {fileID: 538720358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &538720374 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 1081304167194498590, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
m_PrefabInstance: {fileID: 538720358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &538720375 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: -7252984113429599143, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
m_PrefabInstance: {fileID: 538720358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!64 &538720376
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 538720371}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 875684015541860908, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
--- !u!65 &538720377
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 538720372}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 20.501282, y: 7.4813514, z: 3.0611467}
|
||||
m_Center: {x: 0.01943779, y: -0.0000023836064, z: -0.0000005364418}
|
||||
--- !u!65 &538720378
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 538720373}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.017846553, y: 0.042929336, z: 0.01199293}
|
||||
m_Center: {x: 0.000000001396633, y: 0.000011772849, z: 0.008053278}
|
||||
--- !u!64 &538720379
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 538720374}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: -2467101229604563246, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
--- !u!64 &538720380
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 538720375}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 6693000068959362022, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
--- !u!1 &539975123
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -29603,6 +29816,20 @@ Canvas:
|
|||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 1
|
||||
m_TargetDisplay: 0
|
||||
--- !u!64 &775055322
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 538720369}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 612439612021548650, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
--- !u!1 &780357899
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -34471,6 +34698,20 @@ GameObject:
|
|||
m_CorrespondingSourceObject: {fileID: 322936463316669892, guid: e6024f57cedac6a40be3574b2630b881, type: 3}
|
||||
m_PrefabInstance: {fileID: 901287841}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!64 &904988658
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 538720367}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: -3649035327923395803, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
--- !u!1 &905697361
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -49302,6 +49543,19 @@ GameObject:
|
|||
m_CorrespondingSourceObject: {fileID: 322936463316669892, guid: e6024f57cedac6a40be3574b2630b881, type: 3}
|
||||
m_PrefabInstance: {fileID: 1269524962}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!65 &1278546766
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 538720370}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 0.58452183, y: 6.628678, z: 1.0301971}
|
||||
m_Center: {x: -0.0000076293945, y: 0.000007390976, z: 0.0000009834766}
|
||||
--- !u!1 &1283641336
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -72650,6 +72904,10 @@ PrefabInstance:
|
|||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6005652620711740599, guid: 48e36ea59837ea244852e73183f1a373, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6005652620711740599, guid: 48e36ea59837ea244852e73183f1a373, type: 3}
|
||||
propertyPath: m_StaticEditorFlags
|
||||
value: 0
|
||||
|
@ -75530,6 +75788,20 @@ MeshFilter:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1968359458}
|
||||
m_Mesh: {fileID: -4668275258704282929, guid: d6187d5c5284e6241bed7be6c0b0f50d, type: 3}
|
||||
--- !u!64 &1968732472
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 538720364}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: -5723618795727218169, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
--- !u!1 &1977894792
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -81205,6 +81477,20 @@ Transform:
|
|||
m_Father: {fileID: 1149883207}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!64 &2143528134
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 538720366}
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 1
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: -5374883800896729798, guid: 83c032d0039839e438b2991cdf46adca, type: 3}
|
||||
--- !u!1 &2143994190
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -5192,6 +5192,29 @@ PrefabInstance:
|
|||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
|
||||
--- !u!1 &1039716618 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 3350233854110697404, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
|
||||
m_PrefabInstance: {fileID: 1039716617}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &1039716619
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1039716618}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5eb279537374e4e4d8f1ad4cf74d2b06, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
playerCamera: {fileID: 1039716620}
|
||||
--- !u!20 &1039716620 stripped
|
||||
Camera:
|
||||
m_CorrespondingSourceObject: {fileID: 3350233855506296104, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
|
||||
m_PrefabInstance: {fileID: 1039716617}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &1064116793
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -8,169 +8,14 @@ using TMPro;
|
|||
|
||||
public class CameraControl1 : MonoBehaviour
|
||||
{
|
||||
|
||||
public static CameraControl1 ins;
|
||||
[Header("设置参数")]
|
||||
[SerializeField] float minDis = 2;
|
||||
[SerializeField] float maxDis ;
|
||||
[SerializeField] float mouseRotSpeed = 8;
|
||||
[SerializeField] float touchZoomSpeed = 0.1f;
|
||||
[SerializeField] float touchRotateSpeed = 0.3f;
|
||||
[SerializeField] float mouseMoveSpeed = 1;
|
||||
[SerializeField] float mouseZoomSpeed = 10;
|
||||
[SerializeField] float rSmoothTime = 0.3f;
|
||||
[SerializeField] float sSmoothTime = 0.3f;
|
||||
[SerializeField] float mSmoothTime = 0.3f;
|
||||
[SerializeField] float minVerticalAngle = 0;
|
||||
[SerializeField] float maxVerticalAngle = 60;
|
||||
[Header("用于展示数据")]
|
||||
[SerializeField] float horizontalAngle = 0;
|
||||
[SerializeField] float verticalAngle = 0;
|
||||
[SerializeField] float currentDis = 80;
|
||||
[SerializeField] Vector3 originPosition;
|
||||
[SerializeField] Vector3 targetPosition;
|
||||
//[HideInInspector] public bool isrotateend;
|
||||
bool isrotateable;
|
||||
bool isscaleable;
|
||||
float _targetDis;
|
||||
private Touch oldTouch1;
|
||||
private Touch oldTouch2;
|
||||
//
|
||||
public bool UPDOWN = false;
|
||||
|
||||
|
||||
float targetDis
|
||||
{
|
||||
set
|
||||
{
|
||||
_targetDis = value > maxDis ? maxDis : value < minDis ? minDis : value;
|
||||
}
|
||||
get { return _targetDis; }
|
||||
}
|
||||
Vector3 rVelocity = Vector3.zero;
|
||||
float sVelocity = 0;
|
||||
Vector3 mVelocity = Vector3.zero;
|
||||
Vector3 dampRotation;
|
||||
Transform targetTrans;
|
||||
bool m_IsSingleFinger;
|
||||
private void Awake()
|
||||
{
|
||||
ins = this;
|
||||
targetDis = currentDis;
|
||||
targetPosition = originPosition;
|
||||
}
|
||||
|
||||
[ContextMenu("设置相机位置")]
|
||||
private void SetCameraTrans()
|
||||
{
|
||||
transform.eulerAngles = new Vector3(verticalAngle, horizontalAngle, 0);
|
||||
var offset = transform.forward * -currentDis;
|
||||
transform.position = originPosition + offset;
|
||||
}
|
||||
public void SetTarget(Transform target, float distance = 4)
|
||||
{
|
||||
targetDis = distance;
|
||||
targetTrans = target;
|
||||
}
|
||||
public void SetCenterPoint(Vector3 target, float distance = 4)
|
||||
{
|
||||
targetDis = distance;
|
||||
targetPosition = target;
|
||||
}
|
||||
public void Recover(float max, float min)
|
||||
{
|
||||
|
||||
// targetPosition = originPosition = Vector3.zero;
|
||||
horizontalAngle -= horizontalAngle % 360;
|
||||
verticalAngle = 0;
|
||||
maxDis = max;
|
||||
minDis = min;
|
||||
targetDis = maxDis;
|
||||
// targetTrans = null;
|
||||
}
|
||||
public void RecoverTwo()
|
||||
{
|
||||
horizontalAngle -= horizontalAngle % 360;
|
||||
verticalAngle = 0;
|
||||
targetDis = maxDis;
|
||||
}
|
||||
|
||||
|
||||
float fieldView;
|
||||
public Camera playerCamera;
|
||||
private void Update()
|
||||
{
|
||||
//限制视角上下
|
||||
if (UPDOWN)
|
||||
{
|
||||
if (verticalAngle < -15)
|
||||
{
|
||||
verticalAngle = -15;
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.touchCount == 0)
|
||||
{
|
||||
// isscaleable = true;
|
||||
isrotateable = true;
|
||||
if (Input.GetMouseButton(0))
|
||||
{
|
||||
horizontalAngle += Input.GetAxis("Mouse X") * mouseRotSpeed;
|
||||
verticalAngle -= Input.GetAxis("Mouse Y") * mouseRotSpeed;
|
||||
|
||||
verticalAngle = Mathf.Clamp(verticalAngle, minVerticalAngle, maxVerticalAngle);
|
||||
}
|
||||
targetDis = targetDis - Input.GetAxis("Mouse ScrollWheel") * mouseZoomSpeed;
|
||||
}
|
||||
|
||||
if (Input.touchCount == 1)
|
||||
{
|
||||
if (isrotateable)
|
||||
{
|
||||
if (Input.touches[0].phase == TouchPhase.Began)
|
||||
{
|
||||
oldTouch1 = Input.touches[0];
|
||||
}
|
||||
var deltaPos = Input.touches[0].position - oldTouch1.position;
|
||||
horizontalAngle += deltaPos.x * touchRotateSpeed*3f ;
|
||||
verticalAngle -= deltaPos.y * touchRotateSpeed;
|
||||
verticalAngle = Mathf.Clamp(verticalAngle, minVerticalAngle, maxVerticalAngle);
|
||||
oldTouch1 = Input.touches[0];
|
||||
}
|
||||
}
|
||||
if (Input.touchCount == 2)
|
||||
{
|
||||
isrotateable = false ;
|
||||
if (Input.touches[1].phase == TouchPhase.Began)
|
||||
{
|
||||
oldTouch1 = Input.touches[0];
|
||||
oldTouch2 = Input.touches[1];
|
||||
}
|
||||
float currentTouchDistance = Vector2.Distance(Input.touches[0].position, Input.touches[1].position);
|
||||
float lastTouchDistance = Vector2.Distance(oldTouch1.position, oldTouch2.position);
|
||||
if (Input.touches[0].phase != TouchPhase.Ended && Input.touches[1].phase != TouchPhase.Ended)
|
||||
{
|
||||
//计算上次和这次双指触摸之间的距离差距
|
||||
//然后去更改摄像机的距离
|
||||
targetDis -= (currentTouchDistance - lastTouchDistance) * touchZoomSpeed;
|
||||
oldTouch1 = Input.touches[0];
|
||||
oldTouch2 = Input.touches[1];
|
||||
}
|
||||
}
|
||||
|
||||
currentDis = Mathf.SmoothDamp(currentDis, targetDis, ref sVelocity, rSmoothTime);
|
||||
dampRotation = Vector3.SmoothDamp(dampRotation, new Vector3(verticalAngle, horizontalAngle), ref rVelocity, rSmoothTime);
|
||||
transform.rotation = Quaternion.Euler(dampRotation);
|
||||
if (targetTrans != null)
|
||||
{
|
||||
if (originPosition != targetTrans.position)
|
||||
originPosition = Vector3.SmoothDamp(originPosition, targetTrans.position, ref mVelocity, mSmoothTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (originPosition != targetPosition)
|
||||
originPosition = Vector3.SmoothDamp(originPosition, targetPosition, ref mVelocity, mSmoothTime);
|
||||
}
|
||||
var offset = transform.forward * -currentDis;
|
||||
transform.position = originPosition + offset;
|
||||
fieldView = playerCamera.fieldOfView;
|
||||
fieldView -= Input.GetAxis("Mouse ScrollWheel") * 10f;
|
||||
fieldView = Mathf.Clamp(fieldView, 30, 60);
|
||||
playerCamera.fieldOfView = fieldView;
|
||||
}
|
||||
|
||||
}
|
|
@ -22,7 +22,7 @@ public class ClampAmmetersManager : MonoBehaviour
|
|||
}
|
||||
IEnumerator QiDon()
|
||||
{
|
||||
yield return new WaitForSeconds(4f);
|
||||
yield return new WaitForSeconds(5f);
|
||||
init();
|
||||
}
|
||||
/// <summary>
|
||||
|
|
|
@ -35,12 +35,12 @@
|
|||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.ide.visualstudio": "2.0.16",
|
||||
"com.unity.ide.rider": "3.0.15",
|
||||
"com.unity.ide.rider": "3.0.16",
|
||||
"com.unity.ide.vscode": "1.2.5",
|
||||
"com.unity.editorcoroutines": "1.0.0",
|
||||
"com.unity.performance.profile-analyzer": "1.1.1",
|
||||
"com.unity.test-framework": "1.1.31",
|
||||
"com.unity.testtools.codecoverage": "1.0.1"
|
||||
"com.unity.testtools.codecoverage": "1.2.2"
|
||||
}
|
||||
},
|
||||
"com.unity.ide.rider": {
|
||||
|
@ -92,7 +92,7 @@
|
|||
"url": "https://packages.unity.cn"
|
||||
},
|
||||
"com.unity.services.core": {
|
||||
"version": "1.4.2",
|
||||
"version": "1.6.0",
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
@ -121,7 +121,7 @@
|
|||
"url": "https://packages.unity.cn"
|
||||
},
|
||||
"com.unity.testtools.codecoverage": {
|
||||
"version": "1.0.1",
|
||||
"version": "1.2.2",
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
|
Loading…
Reference in New Issue