修改为joint
This commit is contained in:
@@ -12,12 +12,12 @@ GameObject:
|
||||
- component: {fileID: 114581403422500557}
|
||||
- component: {fileID: 991521994724602848}
|
||||
m_Layer: 19
|
||||
m_Name: Fishing Line
|
||||
m_Name: Line1
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4439867113915692
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -31,7 +31,7 @@ Transform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4283454774123242}
|
||||
m_Father: {fileID: 7692770133466116076}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &114581403422500557
|
||||
MonoBehaviour:
|
||||
@@ -45,7 +45,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 98ba9d435a0e49c9bb527c34cc91894d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
startAnchor: {fileID: 0}
|
||||
startAnchor: {fileID: 5597807613657979793}
|
||||
endAnchor: {fileID: 54298866000586118}
|
||||
LineMultiple: 5
|
||||
physicsSegmentLen: 0.1
|
||||
@@ -55,6 +55,7 @@ MonoBehaviour:
|
||||
velocityDampen: 0.95
|
||||
stiffness: 0.8
|
||||
iterations: 10
|
||||
hardTightenIterations: 2
|
||||
initialLength: 0
|
||||
lengthSmoothTime: 0.15
|
||||
lengthChangeVelocityKill: 0.4
|
||||
@@ -71,16 +72,30 @@ MonoBehaviour:
|
||||
groundSampleStep: 3
|
||||
groundInterpolate: 1
|
||||
groundUpdateEvery: 1
|
||||
groundPostConstraintIterations: 2
|
||||
constrainToWaterSurface: 1
|
||||
waterLevelY: 0
|
||||
waterSurfaceOffset: 0.002
|
||||
waterSampleStep: 2
|
||||
waterInterpolate: 1
|
||||
waterUpdateEvery: 1
|
||||
waterLiftStrength: 0.25
|
||||
keepStartAdjacentNodeFollow: 1
|
||||
waterPostConstraintIterations: 2
|
||||
renderSubdivisionsIdle: 6
|
||||
renderSubdivisionsMoving: 2
|
||||
movingSpeedThreshold: 2
|
||||
smooth: 1
|
||||
lineWidth: 0.001
|
||||
cullRemoteRopeWhenInvisible: 1
|
||||
localOwnerAlwaysSimulate: 1
|
||||
visibilityCheckEvery: 10
|
||||
visibilityViewportPadding: 0.08
|
||||
airDrag: 0.2
|
||||
airDragXZ: 0.6
|
||||
--- !u!120 &991521994724602848
|
||||
LineRenderer:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@@ -126,6 +141,7 @@ LineRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_Positions:
|
||||
- {x: 0, y: 0, z: 0}
|
||||
- {x: 0, y: 0, z: 1}
|
||||
@@ -184,7 +200,6 @@ LineRenderer:
|
||||
textureScale: {x: 1, y: 1}
|
||||
shadowBias: 0.5
|
||||
generateLightingData: 0
|
||||
m_MaskInteraction: 0
|
||||
m_UseWorldSpace: 1
|
||||
m_Loop: 0
|
||||
m_ApplyActiveColorSpace: 1
|
||||
@@ -198,16 +213,17 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 4026445325167852}
|
||||
- component: {fileID: 54679398375713381}
|
||||
- component: {fileID: 153611279189314279}
|
||||
- component: {fileID: 135844594273256032}
|
||||
- component: {fileID: 1923684598771359451}
|
||||
- component: {fileID: 4840064090904105689}
|
||||
- component: {fileID: 2305106969988397276}
|
||||
- component: {fileID: 6377942246174119720}
|
||||
m_Layer: 7
|
||||
m_Name: Lure
|
||||
m_Name: End
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4026445325167852
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -250,108 +266,6 @@ Rigidbody:
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 2
|
||||
--- !u!153 &153611279189314279
|
||||
ConfigurableJoint:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1035052809208993}
|
||||
serializedVersion: 4
|
||||
m_ConnectedBody: {fileID: 54298866000586118}
|
||||
m_ConnectedArticulationBody: {fileID: 0}
|
||||
m_Anchor: {x: 0, y: 0, z: 0}
|
||||
m_Axis: {x: 0, y: 0, z: 0}
|
||||
m_AutoConfigureConnectedAnchor: 0
|
||||
m_ConnectedAnchor: {x: 0, y: 0, z: 0}
|
||||
m_SecondaryAxis: {x: 0, y: 0, z: 0}
|
||||
m_XMotion: 1
|
||||
m_YMotion: 1
|
||||
m_ZMotion: 1
|
||||
m_AngularXMotion: 2
|
||||
m_AngularYMotion: 2
|
||||
m_AngularZMotion: 2
|
||||
m_LinearLimitSpring:
|
||||
spring: 0
|
||||
damper: 0
|
||||
m_LinearLimit:
|
||||
limit: 0.5
|
||||
bounciness: 0
|
||||
contactDistance: 0
|
||||
m_AngularXLimitSpring:
|
||||
spring: 0
|
||||
damper: 0
|
||||
m_LowAngularXLimit:
|
||||
limit: 0
|
||||
bounciness: 0
|
||||
contactDistance: 0
|
||||
m_HighAngularXLimit:
|
||||
limit: 0
|
||||
bounciness: 0
|
||||
contactDistance: 0
|
||||
m_AngularYZLimitSpring:
|
||||
spring: 0
|
||||
damper: 0
|
||||
m_AngularYLimit:
|
||||
limit: 0
|
||||
bounciness: 0
|
||||
contactDistance: 0
|
||||
m_AngularZLimit:
|
||||
limit: 0
|
||||
bounciness: 0
|
||||
contactDistance: 0
|
||||
m_TargetPosition: {x: 0, y: 0, z: 0}
|
||||
m_TargetVelocity: {x: 0, y: 0, z: 0}
|
||||
m_XDrive:
|
||||
serializedVersion: 4
|
||||
positionSpring: 0
|
||||
positionDamper: 0
|
||||
maximumForce: 3.4028233e+38
|
||||
useAcceleration: 0
|
||||
m_YDrive:
|
||||
serializedVersion: 4
|
||||
positionSpring: 0
|
||||
positionDamper: 0
|
||||
maximumForce: 3.4028233e+38
|
||||
useAcceleration: 0
|
||||
m_ZDrive:
|
||||
serializedVersion: 4
|
||||
positionSpring: 0
|
||||
positionDamper: 0
|
||||
maximumForce: 3.4028233e+38
|
||||
useAcceleration: 0
|
||||
m_TargetRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_TargetAngularVelocity: {x: 0, y: 0, z: 0}
|
||||
m_RotationDriveMode: 0
|
||||
m_AngularXDrive:
|
||||
serializedVersion: 4
|
||||
positionSpring: 0
|
||||
positionDamper: 0
|
||||
maximumForce: 3.4028233e+38
|
||||
useAcceleration: 0
|
||||
m_AngularYZDrive:
|
||||
serializedVersion: 4
|
||||
positionSpring: 0
|
||||
positionDamper: 0
|
||||
maximumForce: 3.4028233e+38
|
||||
useAcceleration: 0
|
||||
m_SlerpDrive:
|
||||
serializedVersion: 4
|
||||
positionSpring: 0
|
||||
positionDamper: 0
|
||||
maximumForce: 3.4028233e+38
|
||||
useAcceleration: 0
|
||||
m_ProjectionMode: 1
|
||||
m_ProjectionDistance: 0
|
||||
m_ProjectionAngle: 0
|
||||
m_ConfiguredInWorldSpace: 0
|
||||
m_SwapBodies: 0
|
||||
m_BreakForce: Infinity
|
||||
m_BreakTorque: Infinity
|
||||
m_EnableCollision: 0
|
||||
m_EnablePreprocessing: 0
|
||||
m_MassScale: 1
|
||||
m_ConnectedMassScale: 1
|
||||
--- !u!135 &135844594273256032
|
||||
SphereCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -373,7 +287,31 @@ SphereCollider:
|
||||
serializedVersion: 3
|
||||
m_Radius: 0.003
|
||||
m_Center: {x: 0, y: -0.0015, z: 0}
|
||||
--- !u!114 &1923684598771359451
|
||||
--- !u!145 &4840064090904105689
|
||||
SpringJoint:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1035052809208993}
|
||||
serializedVersion: 4
|
||||
m_ConnectedBody: {fileID: 54298866000586118}
|
||||
m_ConnectedArticulationBody: {fileID: 0}
|
||||
m_Anchor: {x: 0, y: 0, z: 0}
|
||||
m_AutoConfigureConnectedAnchor: 1
|
||||
m_ConnectedAnchor: {x: 0, y: 0, z: 0}
|
||||
m_Spring: 10000
|
||||
m_Damper: 1
|
||||
m_MinDistance: 0
|
||||
m_MaxDistance: 0
|
||||
m_Tolerance: 0.025
|
||||
m_BreakForce: Infinity
|
||||
m_BreakTorque: Infinity
|
||||
m_EnableCollision: 1
|
||||
m_EnablePreprocessing: 1
|
||||
m_MassScale: 1
|
||||
m_ConnectedMassScale: 1
|
||||
--- !u!114 &2305106969988397276
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -382,11 +320,25 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 1035052809208993}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ed5bbbc032ec4ca1bb56991d9141e311, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 7f840e1966fd4c2aafe2f37ca260cdd2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::NBF.LureController
|
||||
rBody: {fileID: 54679398375713381}
|
||||
joint: {fileID: 153611279189314279}
|
||||
m_EditorClassIdentifier: Assembly-CSharp::NBF.FLineLogicNode
|
||||
NodeType: 3
|
||||
rope: {fileID: 114504105083509877}
|
||||
--- !u!114 &6377942246174119720
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1035052809208993}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1de1bec90e454664a860c5248170ff95, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::NBF.JointPinchController
|
||||
moveSpeed: 5
|
||||
snapDistance: 0.1
|
||||
--- !u!1 &1387836627839849
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -417,10 +369,10 @@ Transform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 4439867113915692}
|
||||
- {fileID: 4110509859352936}
|
||||
- {fileID: 4026445325167852}
|
||||
- {fileID: 7692770133466116076}
|
||||
- {fileID: 9208415877353988341}
|
||||
- {fileID: 4530253318796540}
|
||||
- {fileID: 4026445325167852}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &114112904742580403
|
||||
@@ -435,13 +387,18 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c0403ffd74ce46fab8bd4ef057e51432, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ConfigId: 0
|
||||
LineType: 0
|
||||
anchorTransform: {fileID: 0}
|
||||
lineNodes:
|
||||
- {fileID: 3463242999848273700}
|
||||
- {fileID: 8491405271793597799}
|
||||
- {fileID: 2305106969988397276}
|
||||
isLureConnect: 0
|
||||
rodLine: {fileID: 0}
|
||||
fishingRope: {fileID: 114581403422500557}
|
||||
bobberRope: {fileID: 114504105083509877}
|
||||
Lure: {fileID: 1923684598771359451}
|
||||
Bobber: {fileID: 2717383850592950062}
|
||||
LinelenghtDiferent: 0
|
||||
--- !u!1 &1858052053854210
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -452,16 +409,15 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 4530253318796540}
|
||||
- component: {fileID: 54298866000586118}
|
||||
- component: {fileID: 153691655494134957}
|
||||
- component: {fileID: 2717383850592950062}
|
||||
- component: {fileID: 8545743762334745476}
|
||||
- component: {fileID: 4027588950793546390}
|
||||
- component: {fileID: 8491405271793597799}
|
||||
m_Layer: 16
|
||||
m_Name: Float
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4530253318796540
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -504,109 +460,31 @@ Rigidbody:
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 2
|
||||
--- !u!153 &153691655494134957
|
||||
ConfigurableJoint:
|
||||
--- !u!145 &4027588950793546390
|
||||
SpringJoint:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1858052053854210}
|
||||
serializedVersion: 4
|
||||
m_ConnectedBody: {fileID: 0}
|
||||
m_ConnectedBody: {fileID: 5597807613657979793}
|
||||
m_ConnectedArticulationBody: {fileID: 0}
|
||||
m_Anchor: {x: 0, y: -0.01, z: 0}
|
||||
m_Axis: {x: 0, y: 0, z: 0}
|
||||
m_AutoConfigureConnectedAnchor: 0
|
||||
m_Anchor: {x: 0, y: 0, z: 0}
|
||||
m_AutoConfigureConnectedAnchor: 1
|
||||
m_ConnectedAnchor: {x: 0, y: 0, z: 0}
|
||||
m_SecondaryAxis: {x: 0, y: 0, z: 0}
|
||||
m_XMotion: 1
|
||||
m_YMotion: 1
|
||||
m_ZMotion: 1
|
||||
m_AngularXMotion: 2
|
||||
m_AngularYMotion: 2
|
||||
m_AngularZMotion: 2
|
||||
m_LinearLimitSpring:
|
||||
spring: 0
|
||||
damper: 0
|
||||
m_LinearLimit:
|
||||
limit: 0.5
|
||||
bounciness: 0
|
||||
contactDistance: 0
|
||||
m_AngularXLimitSpring:
|
||||
spring: 0
|
||||
damper: 0
|
||||
m_LowAngularXLimit:
|
||||
limit: 0
|
||||
bounciness: 0
|
||||
contactDistance: 0
|
||||
m_HighAngularXLimit:
|
||||
limit: 0
|
||||
bounciness: 0
|
||||
contactDistance: 0
|
||||
m_AngularYZLimitSpring:
|
||||
spring: 0
|
||||
damper: 0
|
||||
m_AngularYLimit:
|
||||
limit: 0
|
||||
bounciness: 0
|
||||
contactDistance: 0
|
||||
m_AngularZLimit:
|
||||
limit: 0
|
||||
bounciness: 0
|
||||
contactDistance: 0
|
||||
m_TargetPosition: {x: 0, y: 0, z: 0}
|
||||
m_TargetVelocity: {x: 0, y: 0, z: 0}
|
||||
m_XDrive:
|
||||
serializedVersion: 4
|
||||
positionSpring: 0
|
||||
positionDamper: 0
|
||||
maximumForce: 3.4028233e+38
|
||||
useAcceleration: 0
|
||||
m_YDrive:
|
||||
serializedVersion: 4
|
||||
positionSpring: 0
|
||||
positionDamper: 0
|
||||
maximumForce: 3.4028233e+38
|
||||
useAcceleration: 0
|
||||
m_ZDrive:
|
||||
serializedVersion: 4
|
||||
positionSpring: 0
|
||||
positionDamper: 0
|
||||
maximumForce: 3.4028233e+38
|
||||
useAcceleration: 0
|
||||
m_TargetRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_TargetAngularVelocity: {x: 0, y: 0, z: 0}
|
||||
m_RotationDriveMode: 0
|
||||
m_AngularXDrive:
|
||||
serializedVersion: 4
|
||||
positionSpring: 0
|
||||
positionDamper: 0
|
||||
maximumForce: 3.4028233e+38
|
||||
useAcceleration: 0
|
||||
m_AngularYZDrive:
|
||||
serializedVersion: 4
|
||||
positionSpring: 0
|
||||
positionDamper: 0
|
||||
maximumForce: 3.4028233e+38
|
||||
useAcceleration: 0
|
||||
m_SlerpDrive:
|
||||
serializedVersion: 4
|
||||
positionSpring: 0
|
||||
positionDamper: 0
|
||||
maximumForce: 3.4028233e+38
|
||||
useAcceleration: 0
|
||||
m_ProjectionMode: 1
|
||||
m_ProjectionDistance: 0
|
||||
m_ProjectionAngle: 0
|
||||
m_ConfiguredInWorldSpace: 0
|
||||
m_SwapBodies: 0
|
||||
m_Spring: 10000
|
||||
m_Damper: 1
|
||||
m_MinDistance: 0
|
||||
m_MaxDistance: 0
|
||||
m_Tolerance: 0.025
|
||||
m_BreakForce: Infinity
|
||||
m_BreakTorque: Infinity
|
||||
m_EnableCollision: 0
|
||||
m_EnablePreprocessing: 0
|
||||
m_EnableCollision: 1
|
||||
m_EnablePreprocessing: 1
|
||||
m_MassScale: 1
|
||||
m_ConnectedMassScale: 1
|
||||
--- !u!114 &2717383850592950062
|
||||
--- !u!114 &8491405271793597799
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@@ -615,63 +493,11 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 1858052053854210}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 8e9411b5edc6466a8014c59e3821bbaa, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 7f840e1966fd4c2aafe2f37ca260cdd2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::NBF.BobberController
|
||||
_rbody: {fileID: 54298866000586118}
|
||||
joint: {fileID: 153691655494134957}
|
||||
--- !u!114 &8545743762334745476
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1858052053854210}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f91c9d873c83492ca6d5e3e3a67c1760, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::CapsuleBuoyancyStable
|
||||
buoyancyScale: 1.6
|
||||
samplePoints: 9
|
||||
submergenceCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 1
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 1
|
||||
inSlope: 1
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
verticalDamping: 0.6
|
||||
angularDamping: 0.1
|
||||
uprightSpring: 0
|
||||
uprightDamping: 0.5
|
||||
uprightAxis: 1
|
||||
extraDragInWater: 0.8
|
||||
extraAngularDragInWater: 0.3
|
||||
nearUprightDampingReduce: 0.6
|
||||
nearUprightAngleDeg: 12
|
||||
_waterRenderer: {fileID: 0}
|
||||
_Layer: 1
|
||||
_ObjectWidth: 3
|
||||
drawDebug: 1
|
||||
_init: 0
|
||||
m_EditorClassIdentifier: Assembly-CSharp::NBF.FLineLogicNode
|
||||
NodeType: 1
|
||||
rope: {fileID: 114581403422500557}
|
||||
--- !u!1 &1933124697579601
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -684,12 +510,12 @@ GameObject:
|
||||
- component: {fileID: 114504105083509877}
|
||||
- component: {fileID: 484878994603287356}
|
||||
m_Layer: 0
|
||||
m_Name: Float Line
|
||||
m_Name: Line2
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4110509859352936
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -703,7 +529,7 @@ Transform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4283454774123242}
|
||||
m_Father: {fileID: 7692770133466116076}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &114504105083509877
|
||||
MonoBehaviour:
|
||||
@@ -727,6 +553,7 @@ MonoBehaviour:
|
||||
velocityDampen: 0.95
|
||||
stiffness: 0.8
|
||||
iterations: 10
|
||||
hardTightenIterations: 2
|
||||
initialLength: 0
|
||||
lengthSmoothTime: 0.15
|
||||
lengthChangeVelocityKill: 0.6
|
||||
@@ -743,16 +570,30 @@ MonoBehaviour:
|
||||
groundSampleStep: 3
|
||||
groundInterpolate: 1
|
||||
groundUpdateEvery: 1
|
||||
groundPostConstraintIterations: 2
|
||||
constrainToWaterSurface: 1
|
||||
waterLevelY: 0
|
||||
waterSurfaceOffset: 0.002
|
||||
waterSampleStep: 2
|
||||
waterInterpolate: 1
|
||||
waterUpdateEvery: 1
|
||||
waterLiftStrength: 0.25
|
||||
keepStartAdjacentNodeFollow: 1
|
||||
waterPostConstraintIterations: 2
|
||||
renderSubdivisionsIdle: 6
|
||||
renderSubdivisionsMoving: 2
|
||||
movingSpeedThreshold: 2
|
||||
smooth: 1
|
||||
lineWidth: 0.001
|
||||
cullRemoteRopeWhenInvisible: 1
|
||||
localOwnerAlwaysSimulate: 1
|
||||
visibilityCheckEvery: 10
|
||||
visibilityViewportPadding: 0.08
|
||||
airDrag: 0.9
|
||||
airDragXZ: 0.6
|
||||
--- !u!120 &484878994603287356
|
||||
LineRenderer:
|
||||
serializedVersion: 2
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@@ -798,6 +639,7 @@ LineRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_Positions:
|
||||
- {x: 0, y: 0, z: 0}
|
||||
- {x: 0, y: 0, z: 1}
|
||||
@@ -856,7 +698,113 @@ LineRenderer:
|
||||
textureScale: {x: 1, y: 1}
|
||||
shadowBias: 0.5
|
||||
generateLightingData: 0
|
||||
m_MaskInteraction: 0
|
||||
m_UseWorldSpace: 1
|
||||
m_Loop: 0
|
||||
m_ApplyActiveColorSpace: 1
|
||||
--- !u!1 &1542886292836040378
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 9208415877353988341}
|
||||
- component: {fileID: 5597807613657979793}
|
||||
- component: {fileID: 3463242999848273700}
|
||||
m_Layer: 0
|
||||
m_Name: Start
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &9208415877353988341
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1542886292836040378}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4283454774123242}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!54 &5597807613657979793
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1542886292836040378}
|
||||
serializedVersion: 5
|
||||
m_Mass: 1
|
||||
m_LinearDamping: 0
|
||||
m_AngularDamping: 0.05
|
||||
m_CenterOfMass: {x: 0, y: 0, z: 0}
|
||||
m_InertiaTensor: {x: 1, y: 1, z: 1}
|
||||
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ImplicitCom: 1
|
||||
m_ImplicitTensor: 1
|
||||
m_UseGravity: 1
|
||||
m_IsKinematic: 1
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 0
|
||||
--- !u!114 &3463242999848273700
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1542886292836040378}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7f840e1966fd4c2aafe2f37ca260cdd2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::NBF.FLineLogicNode
|
||||
NodeType: 1
|
||||
rope: {fileID: 0}
|
||||
--- !u!1 &3739175077773299312
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7692770133466116076}
|
||||
m_Layer: 0
|
||||
m_Name: Ropes
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7692770133466116076
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3739175077773299312}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 4439867113915692}
|
||||
- {fileID: 4110509859352936}
|
||||
m_Father: {fileID: 4283454774123242}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public class BobberController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Rigidbody _rbody;
|
||||
|
||||
[SerializeField] private ConfigurableJoint joint;
|
||||
// [SerializeField] private Buoyancy _buoyancy;
|
||||
public Rigidbody rbody => _rbody;
|
||||
|
||||
public Rigidbody JointRb => joint.connectedBody;
|
||||
|
||||
public void SetJoint(Rigidbody rb)
|
||||
{
|
||||
joint = joint == null ? GetComponent<ConfigurableJoint>() : joint;
|
||||
joint.connectedBody = rb;
|
||||
}
|
||||
|
||||
public void SetJointDistance(float limit)
|
||||
{
|
||||
joint.linearLimit = new SoftJointLimit
|
||||
{
|
||||
limit = limit
|
||||
};
|
||||
}
|
||||
|
||||
public void SetDetectCollisionEnabled(bool en)
|
||||
{
|
||||
_rbody.detectCollisions = en;
|
||||
// _buoyancy.EnablePhysics(en);
|
||||
}
|
||||
|
||||
public void SetVelocity(Vector3 velocity)
|
||||
{
|
||||
_rbody.linearVelocity = velocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
// using UnityEngine;
|
||||
//
|
||||
// namespace NBF
|
||||
// {
|
||||
// public class BobberController : MonoBehaviour
|
||||
// {
|
||||
// [SerializeField] private Rigidbody _rbody;
|
||||
//
|
||||
// [SerializeField] private ConfigurableJoint joint;
|
||||
// // [SerializeField] private Buoyancy _buoyancy;
|
||||
// public Rigidbody rbody => _rbody;
|
||||
//
|
||||
// public Rigidbody JointRb => joint.connectedBody;
|
||||
//
|
||||
// public void SetJoint(Rigidbody rb)
|
||||
// {
|
||||
// joint = joint == null ? GetComponent<ConfigurableJoint>() : joint;
|
||||
// joint.connectedBody = rb;
|
||||
// }
|
||||
//
|
||||
// public void SetJointDistance(float limit)
|
||||
// {
|
||||
// joint.linearLimit = new SoftJointLimit
|
||||
// {
|
||||
// limit = limit
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// public void SetDetectCollisionEnabled(bool en)
|
||||
// {
|
||||
// _rbody.detectCollisions = en;
|
||||
// // _buoyancy.EnablePhysics(en);
|
||||
// }
|
||||
//
|
||||
// public void SetVelocity(Vector3 velocity)
|
||||
// {
|
||||
// _rbody.linearVelocity = velocity;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
3
Assets/Scripts/Fishing/New/View/Player/FishingLine.meta
Normal file
3
Assets/Scripts/Fishing/New/View/Player/FishingLine.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab0e597ee4744959abdc5dc66546dacb
|
||||
timeCreated: 1777211780
|
||||
@@ -20,6 +20,9 @@ namespace NBF
|
||||
{
|
||||
public LineType LineType;
|
||||
|
||||
|
||||
[Header("连接点配置")] [SerializeField] private Transform anchorTransform;
|
||||
[SerializeField] private List<FLineLogicNode> lineNodes = new List<FLineLogicNode>();
|
||||
[SerializeField] private bool isLureConnect;
|
||||
[SerializeField] private RodLine rodLine;
|
||||
|
||||
@@ -33,10 +36,14 @@ namespace NBF
|
||||
/// </summary>
|
||||
[SerializeField] private Rope bobberRope;
|
||||
|
||||
public LureController Lure;
|
||||
public BobberController Bobber;
|
||||
// public LureController Lure;
|
||||
// public BobberController Bobber;
|
||||
//
|
||||
// public JointPinchController PinchController;
|
||||
|
||||
public JointPinchController PinchController;
|
||||
public FLineLogicNode StartNode { get; private set; }
|
||||
public FLineLogicNode BobberNode => GetNode(FLineLogicNodeType.Bobber);
|
||||
public FLineLogicNode EndNode { get; private set; }
|
||||
|
||||
|
||||
public float LinelenghtDiferent;
|
||||
@@ -46,17 +53,17 @@ namespace NBF
|
||||
var tipRb = Rod.Asset.LineConnectorRigidbody;
|
||||
if (isLureConnect)
|
||||
{
|
||||
Lure.SetJoint(tipRb);
|
||||
Lure.EnableCollision(false);
|
||||
// Lure.SetJoint(tipRb);
|
||||
// Lure.EnableCollision(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
fishingRope.startAnchor = tipRb;
|
||||
Bobber.SetJoint(tipRb);
|
||||
Lure.SetJoint(Bobber.rbody);
|
||||
Lure.gameObject.SetActive(true);
|
||||
Lure.EnableCollision(false);
|
||||
Lure.SetKinematic(false);
|
||||
// Bobber.SetJoint(tipRb);
|
||||
// Lure.SetJoint(Bobber.rbody);
|
||||
// Lure.gameObject.SetActive(true);
|
||||
// Lure.EnableCollision(false);
|
||||
// Lure.SetKinematic(false);
|
||||
}
|
||||
|
||||
GetComponentsInChildren<Transform>(includeInactive: true).ToList().ForEach(delegate(Transform i)
|
||||
@@ -78,47 +85,13 @@ namespace NBF
|
||||
// rodLine.GenerateLineRendererRope(guides.ToArray(), _LineThickness);
|
||||
}
|
||||
|
||||
public void InitTest(Rigidbody tipRb)
|
||||
{
|
||||
if (isLureConnect)
|
||||
{
|
||||
Lure.SetJoint(tipRb);
|
||||
Lure.EnableCollision(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
fishingRope.startAnchor = tipRb;
|
||||
Bobber.SetJoint(tipRb);
|
||||
Lure.SetJoint(Bobber.rbody);
|
||||
Lure.gameObject.SetActive(true);
|
||||
Lure.EnableCollision(false);
|
||||
Lure.SetKinematic(false);
|
||||
}
|
||||
|
||||
GetComponentsInChildren<Transform>(includeInactive: true).ToList().ForEach(delegate(Transform i)
|
||||
{
|
||||
i.gameObject.SetActive(true);
|
||||
});
|
||||
|
||||
StartCoroutine(LureUseGravity());
|
||||
if (isLureConnect)
|
||||
{
|
||||
fishingRope.Init(Rod);
|
||||
}
|
||||
else
|
||||
{
|
||||
fishingRope.Init(Rod);
|
||||
bobberRope.Init(Rod);
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator LureUseGravity()
|
||||
{
|
||||
yield return 1;
|
||||
Lure.gameObject.SetActive(false);
|
||||
Lure.gameObject.SetActive(true);
|
||||
EndNode.gameObject.SetActive(false);
|
||||
EndNode.gameObject.SetActive(true);
|
||||
yield return 1;
|
||||
Lure.RBody.useGravity = true;
|
||||
EndNode.Rigidbody.useGravity = true;
|
||||
}
|
||||
|
||||
public void SetTargetLength(float value)
|
||||
@@ -138,6 +111,11 @@ namespace NBF
|
||||
bobberRope.SetTargetLength(value);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
StartNode = GetNode(FLineLogicNodeType.Start);
|
||||
EndNode = GetNode(FLineLogicNodeType.End);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
@@ -147,19 +125,65 @@ namespace NBF
|
||||
Rod.PlayerItem.Tension = Mathf.Clamp(LinelenghtDiferent, 0f, 0.05f);
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
UpdateAnchorNode();
|
||||
}
|
||||
|
||||
#region 连接点
|
||||
|
||||
private void UpdateAnchorNode()
|
||||
{
|
||||
if (anchorTransform == null || lineNodes.Count < 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var startNode = lineNodes[0].Rigidbody;
|
||||
startNode.transform.SetPositionAndRotation(anchorTransform.position, anchorTransform.rotation);
|
||||
|
||||
if (!startNode.isKinematic)
|
||||
{
|
||||
startNode.linearVelocity = Vector3.zero;
|
||||
startNode.angularVelocity = Vector3.zero;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取一个节点
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
public FLineLogicNode GetNode(FLineLogicNodeType type)
|
||||
{
|
||||
foreach (var node in lineNodes)
|
||||
{
|
||||
if (node.NodeType == type)
|
||||
{
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void SetLenght(float lenght, FLineLogicNodeType type = FLineLogicNodeType.Bobber)
|
||||
{
|
||||
var node = GetNode(type);
|
||||
if (node != null)
|
||||
{
|
||||
node.SetLenght(lenght);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Tension
|
||||
|
||||
private float GetLineDistance()
|
||||
{
|
||||
if (!Bobber.JointRb)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// return 0;
|
||||
|
||||
//第一个节点到竿稍的位置-第一段鱼线长度
|
||||
return Vector3.Distance(Bobber.transform.position, Bobber.JointRb.transform.position) -
|
||||
return Vector3.Distance(StartNode.transform.position, bobberRope.transform.position) -
|
||||
fishingRope.GetCurrentLength();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public enum FLineLogicNodeType
|
||||
{
|
||||
Start,
|
||||
Bobber,
|
||||
Weight,
|
||||
End
|
||||
}
|
||||
|
||||
public class FLineLogicNode : MonoBehaviour
|
||||
{
|
||||
[Header("节点设置")] public FLineLogicNodeType NodeType = FLineLogicNodeType.Bobber;
|
||||
[SerializeField] private Rope rope;
|
||||
|
||||
private Rigidbody _rb;
|
||||
private SpringJoint _joint;
|
||||
private FLine _parentCable;
|
||||
|
||||
private float _lenght;
|
||||
|
||||
public Rigidbody Rigidbody => _rb;
|
||||
public FLine ParentCable => _parentCable;
|
||||
public SpringJoint Joint => _joint;
|
||||
|
||||
public float Lenght => _lenght;
|
||||
|
||||
public Rope Rope => rope;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_rb = GetComponent<Rigidbody>();
|
||||
_parentCable = GetComponentInParent<FLine>();
|
||||
_joint = GetComponent<SpringJoint>();
|
||||
}
|
||||
|
||||
public void SetLenght(float lenght)
|
||||
{
|
||||
_lenght = lenght;
|
||||
if (_joint)
|
||||
{
|
||||
_joint.maxDistance = lenght;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7f840e1966fd4c2aafe2f37ca260cdd2
|
||||
timeCreated: 1777211794
|
||||
@@ -13,7 +13,7 @@ namespace NBF
|
||||
|
||||
public struct ThrowAnimationRequest
|
||||
{
|
||||
public LureController Lure;
|
||||
public FLineLogicNode EndNode;
|
||||
public Vector3 ThrowOriginPosition;
|
||||
public Vector3 StartPosition;
|
||||
public Vector3 Forward;
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace NBF
|
||||
private float _castElapsedTime;
|
||||
private Vector3 _castStartPos;
|
||||
private Vector3 _castTargetPos;
|
||||
private LureController _castingLure;
|
||||
private FLineLogicNode _castingLure;
|
||||
|
||||
public bool IsPlaying => _castingLure != null;
|
||||
|
||||
@@ -40,18 +40,18 @@ namespace NBF
|
||||
|
||||
public void Play(ThrowAnimationRequest request)
|
||||
{
|
||||
if (request.Lure == null)
|
||||
if (request.EndNode == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Stop(snapToTarget: false);
|
||||
|
||||
_castingLure = request.Lure;
|
||||
_castingLure = request.EndNode;
|
||||
_chargedProgress = Mathf.Clamp01(request.ChargedProgress);
|
||||
_castElapsedTime = 0f;
|
||||
|
||||
var lureBody = request.Lure.RBody;
|
||||
var lureBody = request.EndNode.Rigidbody;
|
||||
_castStartPos = request.StartPosition;
|
||||
|
||||
Vector3 forward = GetHorizontalForward(request.Forward);
|
||||
@@ -81,7 +81,7 @@ namespace NBF
|
||||
return;
|
||||
}
|
||||
|
||||
var lureBody = _castingLure.RBody;
|
||||
var lureBody = _castingLure.Rigidbody;
|
||||
if (snapToTarget)
|
||||
{
|
||||
_castingLure.transform.position = _castTargetPos;
|
||||
@@ -150,4 +150,4 @@ namespace NBF
|
||||
return position;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -101,9 +101,11 @@ namespace NBF
|
||||
var handItemView = Player.HandItem.GetComponent<PlayerItemView>();
|
||||
if (handItemView != null && handItemView.Rod != null)
|
||||
{
|
||||
if (handItemView.Rod.Line.PinchController != null)
|
||||
var endNode = handItemView.Rod.Line.EndNode;
|
||||
var pinch = endNode.GetComponent<JointPinchController>();
|
||||
if (pinch != null)
|
||||
{
|
||||
handItemView.Rod.Line.PinchController.StartPinch(view.Unity.ModelAsset.Pinch);
|
||||
pinch.StartPinch(view.Unity.ModelAsset.Pinch);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,9 +120,11 @@ namespace NBF
|
||||
var handItemView = Player.HandItem.GetComponent<PlayerItemView>();
|
||||
if (handItemView != null && handItemView.Rod != null)
|
||||
{
|
||||
if (handItemView.Rod.Line.PinchController != null)
|
||||
var endNode = handItemView.Rod.Line.EndNode;
|
||||
var pinch = endNode.GetComponent<JointPinchController>();
|
||||
if (pinch != null)
|
||||
{
|
||||
handItemView.Rod.Line.PinchController.ReleasePinch();
|
||||
pinch.ReleasePinch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace NBF
|
||||
PlayerView.Unity.ModelAsset.PlayerAnimator.StartThrow = false;
|
||||
|
||||
var rod = GetRod();
|
||||
if (rod == null || rod.Line == null || rod.Line.Lure == null)
|
||||
if (rod == null || rod.Line == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -70,9 +70,9 @@ namespace NBF
|
||||
_throwAnimation.Player = Player;
|
||||
_throwAnimation?.Play(new ThrowAnimationRequest
|
||||
{
|
||||
Lure = rod.Line.Lure,
|
||||
EndNode = rod.Line.EndNode,
|
||||
ThrowOriginPosition = PlayerView.Unity.transform.position,
|
||||
StartPosition = rod.Line.Lure.RBody.position,
|
||||
StartPosition = rod.Line.EndNode.Rigidbody.position,
|
||||
Forward = PlayerView.Unity.transform.forward,
|
||||
ChargedProgress = ChargedProgress
|
||||
});
|
||||
|
||||
@@ -7,7 +7,8 @@ namespace NBF
|
||||
protected override void OnInit()
|
||||
{
|
||||
// transform.position = Rod.lineHandler.LineConnector_1.transform.position;
|
||||
SetParent(Rod.Line.Bobber.transform);
|
||||
var endNode = Rod.Line.GetNode(FLineLogicNodeType.Bobber);
|
||||
SetParent(endNode.transform);
|
||||
transform.localPosition = Vector3.zero;
|
||||
// var buoyancy = GetComponentInParent<CapsuleBuoyancyStable>();
|
||||
// buoyancy.InitBobber();
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace NBF
|
||||
// transform.rotation = Rod.lineHandler.LineConnector_2.transform.rotation; // 确保旋转也同步
|
||||
// SetParent(Rod.lineHandler.LineConnector_2.transform);
|
||||
|
||||
|
||||
SetParent(Rod.Line.Lure.transform);
|
||||
var endNode = Rod.Line.GetNode(FLineLogicNodeType.End);
|
||||
SetParent(endNode.transform);
|
||||
transform.localPosition = Vector3.zero;
|
||||
|
||||
// var target = lineHandler.LineConnector_2.GetComponent<Rigidbody>();
|
||||
|
||||
@@ -14,7 +14,8 @@ namespace NBF
|
||||
|
||||
// SetParent(Rod.lineHandler.LineConnector_1.transform);
|
||||
|
||||
SetParent(Rod.Line.Lure.transform);
|
||||
var endNode = Rod.Line.GetNode(FLineLogicNodeType.End);
|
||||
SetParent(endNode.transform);
|
||||
transform.localPosition = Vector3.zero;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,24 +72,27 @@ namespace NBF
|
||||
if (Line.LineType == LineType.Spinning)
|
||||
{
|
||||
//没有浮漂类型
|
||||
Line.Lure.SetJointDistance(PlayerItem.LineLength);
|
||||
if (PlayerItem.StretchRope)
|
||||
{
|
||||
// Line.SetTargetLength(PlayerItem.Tension > 0f ? 0f : PlayerItem.LineLength);
|
||||
Line.SetTargetLength(PlayerItem.LineLength);
|
||||
}
|
||||
Line.SetLenght(PlayerItem.LineLength);
|
||||
|
||||
// if (PlayerItem.StretchRope)
|
||||
// {
|
||||
// // Line.SetTargetLength(PlayerItem.Tension > 0f ? 0f : PlayerItem.LineLength);
|
||||
// Line.SetTargetLength(PlayerItem.LineLength);
|
||||
// }
|
||||
}
|
||||
else
|
||||
{
|
||||
//有浮漂
|
||||
Line.Lure.SetJointDistance(PlayerItem.FloatLength);
|
||||
Line.Bobber.SetJointDistance(PlayerItem.LineLength - PlayerItem.FloatLength);
|
||||
if (PlayerItem.StretchRope)
|
||||
{
|
||||
// Line.SetTargetLength(PlayerItem.Tension > 0f ? 0f : PlayerItem.LineLength - PlayerItem.FloatLength);
|
||||
Line.SetTargetLength(PlayerItem.LineLength - PlayerItem.FloatLength);
|
||||
Line.SetLureLength(PlayerItem.FloatLength);
|
||||
}
|
||||
Line.SetLenght(PlayerItem.LineLength - PlayerItem.FloatLength);
|
||||
Line.SetLenght(PlayerItem.FloatLength, FLineLogicNodeType.End);
|
||||
|
||||
|
||||
// if (PlayerItem.StretchRope)
|
||||
// {
|
||||
// // Line.SetTargetLength(PlayerItem.Tension > 0f ? 0f : PlayerItem.LineLength - PlayerItem.FloatLength);
|
||||
// Line.SetTargetLength(PlayerItem.LineLength - PlayerItem.FloatLength);
|
||||
// Line.SetLureLength(PlayerItem.FloatLength);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,11 +342,11 @@ namespace NBF
|
||||
var state = PlayerItem.Owner.State;
|
||||
|
||||
|
||||
Vector3 vector = Line.Lure.transform.position;
|
||||
Vector3 vector = Line.EndNode.transform.position;
|
||||
|
||||
// 当前物体的朝向与指向 Lure 的方向之间的夹角,在 0(完全对齐)到 1(完全相反)之间的一个比例值
|
||||
float headingAlignment = Vector3.Angle(base.transform.forward,
|
||||
(Line.Lure.transform.position - transform.position).normalized) / 180f;
|
||||
(Line.EndNode.transform.position - transform.position).normalized) / 180f;
|
||||
// 经过朝向调制后的有效张力
|
||||
var effectiveTension = Mathf.Clamp(CurrentTension01 * headingAlignment, 0f, 1f);
|
||||
|
||||
|
||||
65570
replay_pid33344.log
Normal file
65570
replay_pid33344.log
Normal file
File diff suppressed because one or more lines are too long
60665
replay_pid6528.log
Normal file
60665
replay_pid6528.log
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user