修改水

This commit is contained in:
2026-01-01 22:00:33 +08:00
parent 040a222bd6
commit 9ceffccd39
1800 changed files with 103929 additions and 139495 deletions

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: e016b4df5bfaf488f91ab99ebca81d83
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -54,9 +54,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3}
m_Name: Chain
m_EditorClassIdentifier:
m_Checksum: 2706284093
m_Empty: 0
m_Edited: 0
m_ActiveParticleCount: 24
m_InitialActiveParticleCount: 24
_bounds:
@@ -312,7 +310,6 @@ MonoBehaviour:
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
restNormals: []
orientations: []
restOrientations: []
velocities:
@@ -1542,393 +1539,7 @@ MonoBehaviour:
shapeMatchingConstraintsData:
batches: []
aerodynamicConstraintsData:
batches:
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000
m_ConstraintCount: 124
m_ActiveConstraintCount: 24
m_InitialActiveConstraintCount: 24
particleIndices:
serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
aerodynamicCoeffs:
serializedContents:
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.20000003
- 1
- 1
- 0.20000003
- 1
- 1
- 0.20000003
- 1
- 1
- 0.20000005
- 1
- 1
- 0.20000005
- 1
- 1
- 0.20000005
- 1
- 1
- 0.20000005
- 1
- 1
- 0.20000005
- 1
- 1
- 0.20000005
- 1
- 1
- 0.20000005
- 1
- 1
- 0.20000003
- 1
- 1
- 0.20000003
- 1
- 1
- 0.20000003
- 1
- 1
- 0.20000003
- 1
- 1
- 0.20000003
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
m_AlignBytes: 16
batches: []
chainConstraintsData:
batches: []
volumeConstraintsData:
@@ -2078,7 +1689,6 @@ MonoBehaviour:
m_InterParticleDistance: 0.22296134
totalParticles: 124
m_RestLength: 27.388588
deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f000000100000001000000011000000110000001200000012000000130000001300000014000000140000001500000015000000160000001600000017000000
restLengths:
- 0.20054139
- 0.20063484

View File

@@ -40,9 +40,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3}
m_Name: Firehose
m_EditorClassIdentifier:
m_Checksum: 0
m_Empty: 0
m_Edited: 0
m_ActiveParticleCount: 40
m_InitialActiveParticleCount: 40
_bounds:
@@ -130,7 +128,6 @@ MonoBehaviour:
- {x: 0.72034454, y: 0, z: 0, w: 1}
- {x: 0.8617192, y: 0, z: 0, w: 1}
- {x: 1, y: 0, z: 0, w: 1}
restNormals: []
orientations: []
restOrientations: []
velocities:
@@ -722,7 +719,6 @@ MonoBehaviour:
m_InterParticleDistance: 0.140052
totalParticles: 40
m_RestLength: 5.4620275
deformableEdges:
restLengths:
- 0.11343384
- 0.1400795

View File

@@ -12,32 +12,30 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3}
m_Name: Freightlift cable
m_EditorClassIdentifier:
m_Checksum: 3171106762
m_Empty: 0
m_Edited: 0
m_ActiveParticleCount: 18
m_InitialActiveParticleCount: 18
_bounds:
m_Center: {x: 0, y: 0, z: -0.0004623294}
m_Extent: {x: 1, y: 0, z: 0.0004623294}
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 1, y: 0, z: 0}
positions:
- {x: -1, y: 0, z: 0}
- {x: -0.88329995, y: 0, z: 0}
- {x: -0.76649326, y: 0, z: -0.000036758112}
- {x: -0.64820236, y: 0, z: -0.00011725743}
- {x: -0.53080696, y: 0, z: -0.00021712962}
- {x: -0.412974, y: 0, z: -0.00032654963}
- {x: -0.2950629, y: 0, z: -0.00043869345}
- {x: -0.17718945, y: 0, z: -0.0005487039}
- {x: -0.059382457, y: 0, z: -0.0006525628}
- {x: 0.05835873, y: 0, z: -0.0007464512}
- {x: 0.17614524, y: 0, z: -0.00082634087}
- {x: 0.29400575, y: 0, z: -0.0008873419}
- {x: 0.41192132, y: 0, z: -0.00092308887}
- {x: 0.5298042, y: 0, z: -0.0009246588}
- {x: 0.64736503, y: 0, z: -0.00087855017}
- {x: 0.7652411, y: 0, z: -0.00076061714}
- {x: 0.8829424, y: 0, z: -0.0005206029}
- {x: -0.7666023, y: 0, z: 0}
- {x: -0.64810616, y: 0, z: 0}
- {x: -0.5307922, y: 0, z: 0}
- {x: -0.41302353, y: 0, z: 0}
- {x: -0.2951497, y: 0, z: 0}
- {x: -0.17727831, y: 0, z: 0}
- {x: -0.05943318, y: 0, z: 0}
- {x: 0.058380906, y: 0, z: 0}
- {x: 0.17615423, y: 0, z: 0}
- {x: 0.29385144, y: 0, z: 0}
- {x: 0.41156584, y: 0, z: 0}
- {x: 0.5296772, y: 0, z: 0}
- {x: 0.6477824, y: 0, z: 0}
- {x: 0.76508003, y: 0, z: 0}
- {x: 0.88362336, y: 0, z: 0}
- {x: 1, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
@@ -142,21 +140,21 @@ MonoBehaviour:
restPositions:
- {x: -1, y: 0, z: 0, w: 1}
- {x: -0.88329995, y: 0, z: 0, w: 1}
- {x: -0.76649326, y: 0, z: -0.000036758112, w: 1}
- {x: -0.64820236, y: 0, z: -0.00011725743, w: 1}
- {x: -0.53080696, y: 0, z: -0.00021712962, w: 1}
- {x: -0.412974, y: 0, z: -0.00032654963, w: 1}
- {x: -0.2950629, y: 0, z: -0.00043869345, w: 1}
- {x: -0.17718945, y: 0, z: -0.0005487039, w: 1}
- {x: -0.059382457, y: 0, z: -0.0006525628, w: 1}
- {x: 0.05835873, y: 0, z: -0.0007464512, w: 1}
- {x: 0.17614524, y: 0, z: -0.00082634087, w: 1}
- {x: 0.29400575, y: 0, z: -0.0008873419, w: 1}
- {x: 0.41192132, y: 0, z: -0.00092308887, w: 1}
- {x: 0.5298042, y: 0, z: -0.0009246588, w: 1}
- {x: 0.64736503, y: 0, z: -0.00087855017, w: 1}
- {x: 0.7652411, y: 0, z: -0.00076061714, w: 1}
- {x: 0.8829424, y: 0, z: -0.0005206029, w: 1}
- {x: -0.7666023, y: 0, z: 0, w: 1}
- {x: -0.64810616, y: 0, z: 0, w: 1}
- {x: -0.5307922, y: 0, z: 0, w: 1}
- {x: -0.41302353, y: 0, z: 0, w: 1}
- {x: -0.2951497, y: 0, z: 0, w: 1}
- {x: -0.17727831, y: 0, z: 0, w: 1}
- {x: -0.05943318, y: 0, z: 0, w: 1}
- {x: 0.058380906, y: 0, z: 0, w: 1}
- {x: 0.17615423, y: 0, z: 0, w: 1}
- {x: 0.29385144, y: 0, z: 0, w: 1}
- {x: 0.41156584, y: 0, z: 0, w: 1}
- {x: 0.5296772, y: 0, z: 0, w: 1}
- {x: 0.6477824, y: 0, z: 0, w: 1}
- {x: 0.76508003, y: 0, z: 0, w: 1}
- {x: 0.88362336, y: 0, z: 0, w: 1}
- {x: 1, y: 0, z: 0, w: 1}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
@@ -258,7 +256,6 @@ MonoBehaviour:
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
restNormals: []
orientations: []
restOrientations: []
velocities:
@@ -759,14 +756,14 @@ MonoBehaviour:
restLengths:
serializedContents:
- 0.11670005
- 0.11829093
- 0.11783301
- 0.1178735
- 0.11774122
- 0.117860526
- 0.11788291
- 0.11787611
- 0.11705878
- 0.11849612
- 0.117768645
- 0.1178714
- 0.11781409
- 0.11769721
- 0.11811137
- 0.11729765
- 0.11637664
- 0
- 0
- 0
@@ -893,14 +890,14 @@ MonoBehaviour:
m_AlignBytes: 16
restLengths:
serializedContents:
- 0.11680669
- 0.117395446
- 0.11791115
- 0.117807046
- 0.11778654
- 0.11791558
- 0.11756081
- 0.11770154
- 0.11669767
- 0.11731398
- 0.11787382
- 0.11784513
- 0.117773324
- 0.117714405
- 0.11810517
- 0.11854333
- 0
- 0
- 0
@@ -1028,12 +1025,12 @@ MonoBehaviour:
m_AlignBytes: 16
restBends:
serializedContents:
- 0
- 0
- 0
- 0
- 0
- 0
- 0.000000834465
- 0.00015157461
- 0.000008746982
- 0.000025361776
- 0.000002026558
- 0.0007222295
- 0
- 0
- 0
@@ -1165,12 +1162,12 @@ MonoBehaviour:
m_AlignBytes: 16
restBends:
serializedContents:
- 0
- 0
- 0
- 0
- 0
- 0
- 0.0005994439
- 0.00003501773
- 0.000010348856
- 0.000005722046
- 0.00026917458
- 0.37212557
- 0
- 0
- 0
@@ -1302,12 +1299,12 @@ MonoBehaviour:
m_AlignBytes: 16
restBends:
serializedContents:
- 0
- 0
- 0
- 0
- 0
- 0
- 0.0003940463
- 0.0000008046627
- 0.000013589859
- 0.00013235211
- 0.00041520596
- 0.33333334
- 0
- 0
- 0
@@ -1434,375 +1431,7 @@ MonoBehaviour:
shapeMatchingConstraintsData:
batches: []
aerodynamicConstraintsData:
batches:
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000
m_ConstraintCount: 118
m_ActiveConstraintCount: 18
m_InitialActiveConstraintCount: 18
particleIndices:
serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
aerodynamicCoeffs:
serializedContents:
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
m_AlignBytes: 16
batches: []
chainConstraintsData:
batches: []
volumeConstraintsData:
@@ -1827,9 +1456,9 @@ MonoBehaviour:
position: {x: -0.88329995, y: 0, z: 0}
outTangent: {x: 0.4335778, y: 0, z: 0}
- tangentMode: 0
inTangent: {x: -0.29470557, y: 0, z: -0.0020900369}
inTangent: {x: -0.22383595, y: 0, z: 0}
position: {x: 1, y: 0, z: 0}
outTangent: {x: 0.24999344, y: -0, z: 0.0017729407}
outTangent: {x: 0.25, y: -0, z: -0}
m_Normals:
data:
- {x: 0, y: 1, z: 0}
@@ -1881,28 +1510,28 @@ MonoBehaviour:
- 0.10251689
- 0.1095339
- 0.116700046
- 0.18337668
- 0.25884405
- 0.34207734
- 0.4320518
- 0.5277426
- 0.6281251
- 0.7321743
- 0.8388655
- 0.947174
- 1.056075
- 1.1645436
- 1.2715552
- 1.3760848
- 1.4771078
- 1.5735993
- 1.6645347
- 1.748889
- 1.8256376
- 1.8937557
- 1.9522187
- 2.000002
m_TotalSplineLenght: 2.000002
- 0.18383583
- 0.2605888
- 0.34579644
- 0.43829617
- 0.5369255
- 0.64052194
- 0.7479229
- 0.8579659
- 0.9694884
- 1.0813278
- 1.1923218
- 1.3013076
- 1.4071229
- 1.508605
- 1.6045915
- 1.6939198
- 1.7754273
- 1.8479517
- 1.9103302
- 1.9614005
- 2
m_TotalSplineLenght: 2
OnPathChanged:
m_PersistentCalls:
m_Calls: []
@@ -1917,128 +1546,127 @@ MonoBehaviour:
m_Calls: []
thickness: 0.05
resolution: 0.4
m_InterParticleDistance: 0.11764717
m_InterParticleDistance: 0.11764706
totalParticles: 118
m_RestLength: 13.764719
deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f000000100000001000000011000000
m_RestLength: 13.764717
restLengths:
- 0.11670005
- 0.11680669
- 0.11829093
- 0.117395446
- 0.11783301
- 0.11791115
- 0.1178735
- 0.117807046
- 0.11774122
- 0.11778654
- 0.117860526
- 0.11791558
- 0.11788291
- 0.11756081
- 0.11787611
- 0.11770154
- 0.11705878
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11764717
- 0.11669767
- 0.11849612
- 0.11731398
- 0.117768645
- 0.11787382
- 0.1178714
- 0.11784513
- 0.11781409
- 0.117773324
- 0.11769721
- 0.117714405
- 0.11811137
- 0.11810517
- 0.11729765
- 0.11854333
- 0.11637664
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0.11764706
- 0
pooledParticles: 100
--- !u!114 &1023878380947534591

View File

@@ -40,9 +40,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3}
m_Name: Joints rope 1
m_EditorClassIdentifier:
m_Checksum: 3329514432
m_Empty: 0
m_Edited: 0
m_ActiveParticleCount: 24
m_InitialActiveParticleCount: 24
_bounds:
@@ -298,7 +296,6 @@ MonoBehaviour:
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
restNormals: []
orientations: []
restOrientations: []
velocities:
@@ -1528,393 +1525,7 @@ MonoBehaviour:
shapeMatchingConstraintsData:
batches: []
aerodynamicConstraintsData:
batches:
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000
m_ConstraintCount: 124
m_ActiveConstraintCount: 24
m_InitialActiveConstraintCount: 24
particleIndices:
serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
aerodynamicCoeffs:
serializedContents:
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
m_AlignBytes: 16
batches: []
chainConstraintsData:
batches: []
volumeConstraintsData:
@@ -2096,7 +1707,6 @@ MonoBehaviour:
m_InterParticleDistance: 0.09209887
totalParticles: 124
m_RestLength: 11.325401
deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f000000100000001000000011000000110000001200000012000000130000001300000014000000140000001500000015000000160000001600000017000000
restLengths:
- 0.08187712
- 0.08188899

View File

@@ -26,9 +26,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3}
m_Name: Joints rope 2
m_EditorClassIdentifier:
m_Checksum: 4251140477
m_Empty: 0
m_Edited: 0
m_ActiveParticleCount: 16
m_InitialActiveParticleCount: 16
_bounds:
@@ -268,7 +266,6 @@ MonoBehaviour:
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
restNormals: []
orientations: []
restOrientations: []
velocities:
@@ -1426,369 +1423,7 @@ MonoBehaviour:
shapeMatchingConstraintsData:
batches: []
aerodynamicConstraintsData:
batches:
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f00000070000000710000007200000073000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f00000070000000710000007200000073000000
m_ConstraintCount: 116
m_ActiveConstraintCount: 16
m_InitialActiveConstraintCount: 16
particleIndices:
serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f00000070000000710000007200000073000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
aerodynamicCoeffs:
serializedContents:
- 0.1
- 1
- 1
- 0.10000002
- 1
- 1
- 0.10000002
- 1
- 1
- 0.10000002
- 1
- 1
- 0.10000002
- 1
- 1
- 0.10000002
- 1
- 1
- 0.10000002
- 1
- 1
- 0.10000002
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
m_AlignBytes: 16
batches: []
chainConstraintsData:
batches: []
volumeConstraintsData:
@@ -1938,7 +1573,6 @@ MonoBehaviour:
m_InterParticleDistance: 0.08596755
totalParticles: 116
m_RestLength: 9.847806
deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f000000
restLengths:
- 0.05090946
- 0.050947905

View File

@@ -26,9 +26,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e028b099aa5d14e399bc3d87df5b7737, type: 3}
m_Name: Plectoneme rod
m_EditorClassIdentifier:
m_Checksum: 2962538395
m_Empty: 0
m_Edited: 0
m_ActiveParticleCount: 41
m_InitialActiveParticleCount: 41
_bounds:
@@ -118,7 +116,6 @@ MonoBehaviour:
- {x: 0.90037465, y: 0, z: 0, w: 1}
- {x: 0.95067745, y: 0, z: 0, w: 1}
- {x: 1, y: 0, z: 0, w: 1}
restNormals: []
orientations:
- {x: 0, y: 0.7071068, z: 0, w: 0.7071068}
- {x: 0, y: 0.7071068, z: 0, w: 0.7071068}
@@ -371,7 +368,7 @@ MonoBehaviour:
- 100
- 100
- 100
filters: 0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff
filters: 0100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff00
principalRadii:
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.049999997, y: 0.049999997, z: 0.049999997}
@@ -800,144 +797,7 @@ MonoBehaviour:
shapeMatchingConstraintsData:
batches: []
aerodynamicConstraintsData:
batches:
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000
m_ConstraintCount: 41
m_ActiveConstraintCount: 41
m_InitialActiveConstraintCount: 41
particleIndices:
serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
aerodynamicCoeffs:
serializedContents:
- 0.1
- 1
- 1
- 0.099999994
- 1
- 1
- 0.099999994
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.099999994
- 1
- 1
- 0.099999994
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.099999994
- 1
- 1
- 0.099999994
- 1
- 1
- 0.099999994
- 1
- 1
- 0.099999994
- 1
- 1
- 0.10000002
- 1
- 1
- 0.10000002
- 1
- 1
- 0.099999994
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
m_AlignBytes: 16
batches: []
chainConstraintsData:
batches:
- m_IDs: 00000000
@@ -1044,7 +904,6 @@ MonoBehaviour:
m_InterParticleDistance: 0.049999997
totalParticles: 41
m_RestLength: 1.9999998
deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f0000002000000020000000210000002100000022000000220000002300000023000000240000002400000025000000250000002600000026000000270000002700000028000000
restLengths:
- 0.049322546
- 0.050302863

View File

@@ -1,884 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-3232934742127723785
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3}
m_Name: start
m_EditorClassIdentifier:
particleIndices: 00000000
m_Blueprint: {fileID: 11400000}
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3}
m_Name: RatchetCable
m_EditorClassIdentifier:
m_Checksum: 1380726484
m_Empty: 0
m_Edited: 0
m_ActiveParticleCount: 31
m_InitialActiveParticleCount: 31
_bounds:
m_Center: {x: 0, y: 0.5, z: 0}
m_Extent: {x: 0, y: 2.5, z: 0}
positions:
- {x: 0, y: -2, z: 0}
- {x: 0, y: -1.8339901, z: 0}
- {x: 0, y: -1.6668751, z: 0}
- {x: 0, y: -1.5016013, z: 0}
- {x: 0, y: -1.3355447, z: 0}
- {x: 0, y: -1.1683198, z: 0}
- {x: 0, y: -1.0000137, z: 0}
- {x: 0, y: -0.834779, z: 0}
- {x: 0, y: -0.6677752, z: 0}
- {x: 0, y: -0.50032496, z: 0}
- {x: 0, y: -0.33429456, z: 0}
- {x: 0, y: -0.16700856, z: 0}
- {x: 0, y: -0.00047871275, z: 0}
- {x: 0, y: 0.16636388, z: 0}
- {x: 0, y: 0.33324736, z: 0}
- {x: 0, y: 0.49999976, z: 0}
- {x: 0, y: 0.6667523, z: 0}
- {x: 0, y: 0.83363587, z: 0}
- {x: 0, y: 1.0004781, z: 0}
- {x: 0, y: 1.1670083, z: 0}
- {x: 0, y: 1.334294, z: 0}
- {x: 0, y: 1.5003247, z: 0}
- {x: 0, y: 1.667775, z: 0}
- {x: 0, y: 1.8347788, z: 0}
- {x: 0, y: 2.0000136, z: 0}
- {x: 0, y: 2.1683195, z: 0}
- {x: 0, y: 2.3355443, z: 0}
- {x: 0, y: 2.5016015, z: 0}
- {x: 0, y: 2.6668754, z: 0}
- {x: 0, y: 2.83399, z: 0}
- {x: 0, y: 2.9999998, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
restPositions:
- {x: 0, y: -2, z: 0, w: 1}
- {x: 0, y: -1.8339901, z: 0, w: 1}
- {x: 0, y: -1.6668751, z: 0, w: 1}
- {x: 0, y: -1.5016013, z: 0, w: 1}
- {x: 0, y: -1.3355447, z: 0, w: 1}
- {x: 0, y: -1.1683198, z: 0, w: 1}
- {x: 0, y: -1.0000137, z: 0, w: 1}
- {x: 0, y: -0.834779, z: 0, w: 1}
- {x: 0, y: -0.6677752, z: 0, w: 1}
- {x: 0, y: -0.50032496, z: 0, w: 1}
- {x: 0, y: -0.33429456, z: 0, w: 1}
- {x: 0, y: -0.16700856, z: 0, w: 1}
- {x: 0, y: -0.00047871275, z: 0, w: 1}
- {x: 0, y: 0.16636388, z: 0, w: 1}
- {x: 0, y: 0.33324736, z: 0, w: 1}
- {x: 0, y: 0.49999976, z: 0, w: 1}
- {x: 0, y: 0.6667523, z: 0, w: 1}
- {x: 0, y: 0.83363587, z: 0, w: 1}
- {x: 0, y: 1.0004781, z: 0, w: 1}
- {x: 0, y: 1.1670083, z: 0, w: 1}
- {x: 0, y: 1.334294, z: 0, w: 1}
- {x: 0, y: 1.5003247, z: 0, w: 1}
- {x: 0, y: 1.667775, z: 0, w: 1}
- {x: 0, y: 1.8347788, z: 0, w: 1}
- {x: 0, y: 2.0000136, z: 0, w: 1}
- {x: 0, y: 2.1683195, z: 0, w: 1}
- {x: 0, y: 2.3355443, z: 0, w: 1}
- {x: 0, y: 2.5016015, z: 0, w: 1}
- {x: 0, y: 2.6668754, z: 0, w: 1}
- {x: 0, y: 2.83399, z: 0, w: 1}
- {x: 0, y: 2.9999998, z: 0, w: 1}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
restNormals: []
orientations: []
restOrientations: []
velocities:
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
angularVelocities: []
invMasses:
- 1
- 1
- 0.9999999
- 1.0000001
- 1
- 1
- 1
- 1.0000001
- 0.9999999
- 1.0000001
- 1
- 1
- 1
- 1
- 1.0000001
- 1.0000001
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
invRotationalMasses: []
filters: 0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff00000000000000000000000000000000000000000000000000000000000000000000000000000000
principalRadii:
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05000001, y: 0.05000001, z: 0.05000001}
- {x: 0.049999997, y: 0.049999997, z: 0.049999997}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.049999997, y: 0.049999997, z: 0.049999997}
- {x: 0.05000001, y: 0.05000001, z: 0.05000001}
- {x: 0.049999997, y: 0.049999997, z: 0.049999997}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.049999997, y: 0.049999997, z: 0.049999997}
- {x: 0.049999997, y: 0.049999997, z: 0.049999997}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0.05, y: 0.05, z: 0.05}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
- {x: 0, y: 0, z: 0}
colors:
- {r: 0.10980392, g: 0.6901961, b: 0.8784314, a: 1}
- {r: 0.116365515, g: 0.6851087, b: 0.8719565, a: 1}
- {r: 0.13208458, g: 0.6729213, b: 0.85644525, a: 1.0000001}
- {r: 0.15323167, g: 0.6565252, b: 0.8355775, a: 0.99999994}
- {r: 0.17835046, g: 0.63704985, b: 0.8107907, a: 1}
- {r: 0.20651987, g: 0.61520934, b: 0.7829937, a: 1}
- {r: 0.23708364, g: 0.59151226, b: 0.7528338, a: 1}
- {r: 0.26877022, g: 0.5669446, b: 0.72156584, a: 0.99999994}
- {r: 0.302132, g: 0.5410783, b: 0.6886452, a: 1.0000001}
- {r: 0.3366538, g: 0.5143124, b: 0.6545794, a: 0.99999994}
- {r: 0.37172142, g: 0.4871235, b: 0.6199753, a: 1}
- {r: 0.40771413, g: 0.45921725, b: 0.5844583, a: 1}
- {r: 0.4440449, g: 0.4310489, b: 0.5486077, a: 1}
- {r: 0.4808056, g: 0.4025472, b: 0.5123328, a: 1}
- {r: 0.51781046, g: 0.37385616, b: 0.4758169, a: 0.99999994}
- {r: 0.5549019, g: 0.34509802, b: 0.43921566, a: 0.99999994}
- {r: 0.5919934, g: 0.3163399, b: 0.40261444, a: 1}
- {r: 0.62899834, g: 0.2876489, b: 0.36609858, a: 1}
- {r: 0.66575897, g: 0.25914726, b: 0.32982376, a: 1}
- {r: 0.7020898, g: 0.23097885, b: 0.2939731, a: 1}
- {r: 0.7380824, g: 0.20307265, b: 0.2584561, a: 1}
- {r: 0.7731501, g: 0.17588367, b: 0.22385193, a: 1}
- {r: 0.80767196, g: 0.14911777, b: 0.18978626, a: 1}
- {r: 0.84103364, g: 0.12325145, b: 0.15686548, a: 1}
- {r: 0.8727203, g: 0.098683834, b: 0.12559761, a: 1}
- {r: 0.9032841, g: 0.0749868, b: 0.09543775, a: 1}
- {r: 0.93145347, g: 0.05314622, b: 0.06764065, a: 1}
- {r: 0.95657223, g: 0.033670846, b: 0.042853806, a: 1}
- {r: 0.9777194, g: 0.017274806, b: 0.021986116, a: 1}
- {r: 0.9934384, g: 0.005087384, b: 0.0064748526, a: 1}
- {r: 1, g: 0, b: 0, a: 1}
- {r: 0, g: 0, b: 0, a: 0}
- {r: 0, g: 0, b: 0, a: 0}
- {r: 0, g: 0, b: 0, a: 0}
- {r: 0, g: 0, b: 0, a: 0}
- {r: 0, g: 0, b: 0, a: 0}
- {r: 0, g: 0, b: 0, a: 0}
- {r: 0, g: 0, b: 0, a: 0}
- {r: 0, g: 0, b: 0, a: 0}
- {r: 0, g: 0, b: 0, a: 0}
- {r: 0, g: 0, b: 0, a: 0}
points:
edges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e000000
triangles:
distanceConstraintsData:
batches:
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f00000010000000110000001200000013000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f00000010000000110000001200000013000000
m_ConstraintCount: 20
m_ActiveConstraintCount: 15
m_InitialActiveConstraintCount: 15
particleIndices:
serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
restLengths:
serializedContents:
- 0.1660099
- 0.16527379
- 0.16722488
- 0.16523468
- 0.16745025
- 0.167286
- 0.1668426
- 0.1667524
- 0.16688359
- 0.16653013
- 0.16603076
- 0.16700375
- 0.16830587
- 0.16605711
- 0.16711473
- 0
- 0
- 0
- 0
- 0
m_AlignBytes: 16
stiffnesses:
serializedContents:
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
m_AlignBytes: 16
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f00000010000000110000001200000013000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f00000010000000110000001200000013000000
m_ConstraintCount: 20
m_ActiveConstraintCount: 15
m_InitialActiveConstraintCount: 15
particleIndices:
serializedContents: 0100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
restLengths:
serializedContents:
- 0.16711497
- 0.16605663
- 0.16830611
- 0.16700381
- 0.1660304
- 0.16652985
- 0.16688348
- 0.16675252
- 0.16684228
- 0.16728568
- 0.16745031
- 0.1652348
- 0.16722488
- 0.1652739
- 0.16600966
- 0
- 0
- 0
- 0
- 0
m_AlignBytes: 16
stiffnesses:
serializedContents:
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
m_AlignBytes: 16
bendConstraintsData:
batches:
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c000000
m_ConstraintCount: 13
m_ActiveConstraintCount: 10
m_InitialActiveConstraintCount: 10
particleIndices:
serializedContents: 000000000200000001000000030000000500000004000000060000000800000007000000090000000b0000000a0000000c0000000e0000000d0000000f0000001100000010000000120000001400000013000000150000001700000016000000180000001a000000190000001b0000001d0000001c0000001e000000200000001f000000210000002300000022000000240000002600000025000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
restBends:
serializedContents:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
m_AlignBytes: 16
bendingStiffnesses:
serializedContents:
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
m_AlignBytes: 16
plasticity:
serializedContents:
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
m_AlignBytes: 16
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c000000
m_ConstraintCount: 13
m_ActiveConstraintCount: 10
m_InitialActiveConstraintCount: 10
particleIndices:
serializedContents: 0100000003000000020000000400000006000000050000000700000009000000080000000a0000000c0000000b0000000d0000000f0000000e000000100000001200000011000000130000001500000014000000160000001800000017000000190000001b0000001a0000001c0000001e0000001d0000001f0000002100000020000000220000002400000023000000250000002700000026000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
restBends:
serializedContents:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
m_AlignBytes: 16
bendingStiffnesses:
serializedContents:
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
m_AlignBytes: 16
plasticity:
serializedContents:
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
m_AlignBytes: 16
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c000000
m_ConstraintCount: 13
m_ActiveConstraintCount: 9
m_InitialActiveConstraintCount: 9
particleIndices:
serializedContents: 020000000400000003000000050000000700000006000000080000000a000000090000000b0000000d0000000c0000000e000000100000000f0000001100000013000000120000001400000016000000150000001700000019000000180000001a0000001c0000001b0000001d0000001f0000001e000000200000002200000021000000230000002500000024000000260000002800000027000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
restBends:
serializedContents:
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
m_AlignBytes: 16
bendingStiffnesses:
serializedContents:
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
m_AlignBytes: 16
plasticity:
serializedContents:
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
m_AlignBytes: 16
skinConstraintsData:
batches: []
tetherConstraintsData:
batches: []
stretchShearConstraintsData:
batches: []
bendTwistConstraintsData:
batches: []
shapeMatchingConstraintsData:
batches: []
aerodynamicConstraintsData:
batches:
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000
m_ConstraintCount: 41
m_ActiveConstraintCount: 31
m_InitialActiveConstraintCount: 31
particleIndices:
serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
aerodynamicCoeffs:
serializedContents:
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.10000002
- 1
- 1
- 0.099999994
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.099999994
- 1
- 1
- 0.10000002
- 1
- 1
- 0.099999994
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.099999994
- 1
- 1
- 0.099999994
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0.1
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
m_AlignBytes: 16
chainConstraintsData:
batches: []
volumeConstraintsData:
batches: []
groups:
- {fileID: -3232934742127723785}
- {fileID: 6183219346962753922}
path:
m_Names:
- start
- end
m_Points:
data:
- tangentMode: 0
inTangent: {x: 0, y: -0, z: 0}
position: {x: 0, y: -2, z: 0}
outTangent: {x: -0, y: 1, z: -0}
- tangentMode: 0
inTangent: {x: 0, y: -1, z: 0}
position: {x: 0, y: 2.9999998, z: 0}
outTangent: {x: -0, y: 0, z: -0}
m_Normals:
data:
- {x: 0, y: 1, z: 0}
- {x: 0, y: 1, z: 0}
m_Colors:
data:
- {r: 0.10980392, g: 0.6901961, b: 0.8784314, a: 1}
- {r: 1, g: 0, b: 0, a: 1}
m_Thickness:
data:
- 1
- 1
m_Masses:
data:
- 1
- 1
m_RotationalMasses:
data:
- 1
- 1
m_Filters:
data: 0200ffff0200ffff
m_Closed: 0
m_ArcLengthTable:
- 0
- 0.15603067
- 0.3366807
- 0.5393586
- 0.7614728
- 1.0004319
- 1.2536443
- 1.5185186
- 1.7924631
- 2.0728862
- 2.3571968
- 2.6428032
- 2.9271138
- 3.207537
- 3.4814813
- 3.7463555
- 3.999568
- 4.238527
- 4.460641
- 4.6633186
- 4.843969
- 4.9999995
m_TotalSplineLenght: 4.9999995
OnPathChanged:
m_PersistentCalls:
m_Calls: []
OnControlPointAdded:
m_PersistentCalls:
m_Calls: []
OnControlPointRemoved:
m_PersistentCalls:
m_Calls: []
OnControlPointRenamed:
m_PersistentCalls:
m_Calls: []
thickness: 0.05
resolution: 0.3
m_InterParticleDistance: 0.16666666
totalParticles: 41
m_RestLength: 6.666664
deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e000000
restLengths:
- 0.1660099
- 0.16711497
- 0.16527379
- 0.16605663
- 0.16722488
- 0.16830611
- 0.16523468
- 0.16700381
- 0.16745025
- 0.1660304
- 0.167286
- 0.16652985
- 0.1668426
- 0.16688348
- 0.1667524
- 0.16675252
- 0.16688359
- 0.16684228
- 0.16653013
- 0.16728568
- 0.16603076
- 0.16745031
- 0.16700375
- 0.1652348
- 0.16830587
- 0.16722488
- 0.16605711
- 0.1652739
- 0.16711473
- 0.16600966
- 0.16666666
- 0.16666666
- 0.16666666
- 0.16666666
- 0.16666666
- 0.16666666
- 0.16666666
- 0.16666666
- 0.16666666
- 0.16666666
- 0
pooledParticles: 10
--- !u!114 &6183219346962753922
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3}
m_Name: end
m_EditorClassIdentifier:
particleIndices: 1e000000
m_Blueprint: {fileID: 11400000}

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 558d68cba3927468abede77a3852186b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -26,9 +26,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3}
m_Name: Snake
m_EditorClassIdentifier:
m_Checksum: 1208839425
m_Empty: 0
m_Edited: 0
m_ActiveParticleCount: 27
m_InitialActiveParticleCount: 27
_bounds:
@@ -290,7 +288,6 @@ MonoBehaviour:
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
restNormals: []
orientations: []
restOrientations: []
velocities:
@@ -430,26 +427,26 @@ MonoBehaviour:
- 10
- 10
- 10
- 10.01664
- 10.0662155
- 10.148677
- 10.265117
- 10.417466
- 10.60722
- 10.8371525
- 11.110949
- 11.4355
- 11.815787
- 12.258996
- 12.774428
- 13.373356
- 14.068928
- 14.875339
- 15.804824
- 16.874622
- 18.06043
- 19.263605
- 20
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- 10
- 0
- 0
- 0
@@ -1547,402 +1544,7 @@ MonoBehaviour:
shapeMatchingConstraintsData:
batches: []
aerodynamicConstraintsData:
batches:
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e000000
m_ConstraintCount: 127
m_ActiveConstraintCount: 27
m_InitialActiveConstraintCount: 27
particleIndices:
serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
aerodynamicCoeffs:
serializedContents:
- 0.2
- 1
- 1
- 0.20000003
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.19946842
- 1
- 1
- 0.19789504
- 1
- 1
- 0.19531204
- 1
- 1
- 0.19173537
- 1
- 1
- 0.18717642
- 1
- 1
- 0.18168132
- 1
- 1
- 0.17528054
- 1
- 1
- 0.1680042
- 1
- 1
- 0.15983036
- 1
- 1
- 0.15082408
- 1
- 1
- 0.1410328
- 1
- 1
- 0.13050044
- 1
- 1
- 0.11928175
- 1
- 1
- 0.107451595
- 1
- 1
- 0.09512116
- 1
- 1
- 0.08246982
- 1
- 1
- 0.069633886
- 1
- 1
- 0.057182938
- 1
- 1
- 0.046116363
- 1
- 1
- 0.04
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
m_AlignBytes: 16
batches: []
chainConstraintsData:
batches: []
volumeConstraintsData:
@@ -1989,7 +1591,7 @@ MonoBehaviour:
data:
- 0.1
- 0.1
- 0.05
- 0.1
m_RotationalMasses:
data:
- 1
@@ -2060,7 +1662,6 @@ MonoBehaviour:
m_InterParticleDistance: 0.15824494
totalParticles: 127
m_RestLength: 19.938877
deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a000000
restLengths:
- 0.1524441
- 0.15290284

View File

@@ -208,9 +208,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e028b099aa5d14e399bc3d87df5b7737, type: 3}
m_Name: SpringRod
m_EditorClassIdentifier:
m_Checksum: 3530553094
m_Empty: 0
m_Edited: 0
m_ActiveParticleCount: 59
m_InitialActiveParticleCount: 59
_bounds:
@@ -336,7 +334,6 @@ MonoBehaviour:
- {x: -0.6423058, y: 2.7999995, z: -0.27828628, w: 1}
- {x: -0.48284987, y: 2.8499994, z: -0.50604236, w: 1}
- {x: -0.24786891, y: 2.8999994, z: -0.6546457, w: 1}
restNormals: []
orientations:
- {x: -0.088398315, y: -0.10040869, z: -0.008956829, w: 0.990971}
- {x: -0.08490821, y: -0.2934198, z: -0.026174147, w: 0.95184577}
@@ -638,65 +635,65 @@ MonoBehaviour:
- 1
- 1
invRotationalMasses:
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 0.5
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
filters: 0100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
principalRadii:
- {x: 0.1, y: 0.1, z: 0.1}
@@ -819,7 +816,7 @@ MonoBehaviour:
- {r: 1, g: 1, b: 1, a: 1}
- {r: 1, g: 1, b: 1, a: 1}
points:
edges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000230000002400000024000000250000002500000026000000260000002700000027000000280000002800000029000000290000002a0000002a0000002b0000002b0000002c0000002c0000002d0000002d0000002e0000002e0000002f0000002f00000030000000300000003100000031000000320000003200000033000000330000003400000034000000350000003500000036000000360000003700000037000000380000003800000039000000390000003a000000
edges:
triangles:
distanceConstraintsData:
batches: []
@@ -1129,36 +1126,7 @@ MonoBehaviour:
- {x: 0, y: 0, z: 0}
m_AlignBytes: 16
plasticity:
serializedContents:
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
serializedContents: []
m_AlignBytes: 16
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c000000
@@ -1236,232 +1204,12 @@ MonoBehaviour:
- {x: 0, y: 0, z: 0}
m_AlignBytes: 16
plasticity:
serializedContents:
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
- {x: 0, y: 0}
serializedContents: []
m_AlignBytes: 16
shapeMatchingConstraintsData:
batches: []
aerodynamicConstraintsData:
batches:
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a000000
m_ConstraintCount: 59
m_ActiveConstraintCount: 59
m_InitialActiveConstraintCount: 59
particleIndices:
serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
aerodynamicCoeffs:
serializedContents:
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
m_AlignBytes: 16
batches: []
chainConstraintsData:
batches:
- m_IDs: 00000000
@@ -1802,36 +1550,36 @@ MonoBehaviour:
- 1
m_RotationalMasses:
data:
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
- 1
m_Filters:
data: 010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
m_Closed: 0
@@ -2464,7 +2212,6 @@ MonoBehaviour:
m_InterParticleDistance: 0.28434873
totalParticles: 59
m_RestLength: 16.384266
deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000230000002400000024000000250000002500000026000000260000002700000027000000280000002800000029000000290000002a0000002a0000002b0000002b0000002c0000002c0000002d0000002d0000002e0000002e0000002f0000002f00000030000000300000003100000031000000320000003200000033000000330000003400000034000000350000003500000036000000360000003700000037000000380000003800000039000000390000003a000000
restLengths:
- 0.28248742
- 0.28248742

View File

@@ -40,9 +40,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3}
m_Name: Straight long rope
m_EditorClassIdentifier:
m_Checksum: 540814145
m_Empty: 0
m_Edited: 0
m_ActiveParticleCount: 12
m_InitialActiveParticleCount: 12
_bounds:
@@ -274,7 +272,6 @@ MonoBehaviour:
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
restNormals: []
orientations: []
restOrientations: []
velocities:
@@ -1008,10 +1005,10 @@ MonoBehaviour:
m_AlignBytes: 16
restBends:
serializedContents:
- 0
- 0
- 0
- 0
- 0.00005567074
- 0.00009247661
- 0.000085026026
- 0.0006418228
- 0
- 0
- 0
@@ -1139,10 +1136,10 @@ MonoBehaviour:
m_AlignBytes: 16
restBends:
serializedContents:
- 0
- 0
- 0
- 0
- 0.00031131506
- 0.00003796816
- 0.000033080578
- 0.3935954
- 0
- 0
- 0
@@ -1270,10 +1267,10 @@ MonoBehaviour:
m_AlignBytes: 16
restBends:
serializedContents:
- 0
- 0
- 0
- 0
- 0.000032275915
- 0.0000037252903
- 0.0002731681
- 0.33333334
- 0
- 0
- 0
@@ -1396,357 +1393,7 @@ MonoBehaviour:
shapeMatchingConstraintsData:
batches: []
aerodynamicConstraintsData:
batches:
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000
m_ConstraintCount: 112
m_ActiveConstraintCount: 12
m_InitialActiveConstraintCount: 12
particleIndices:
serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
aerodynamicCoeffs:
serializedContents:
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
m_AlignBytes: 16
batches: []
chainConstraintsData:
batches: []
volumeConstraintsData:
@@ -1864,7 +1511,6 @@ MonoBehaviour:
m_InterParticleDistance: 0.18181819
totalParticles: 112
m_RestLength: 20.181805
deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b000000
restLengths:
- 0.18133646
- 0.18116945

View File

@@ -26,9 +26,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3}
m_Name: Straight short rope
m_EditorClassIdentifier:
m_Checksum: 350243151
m_Empty: 0
m_Edited: 0
m_ActiveParticleCount: 12
m_InitialActiveParticleCount: 12
_bounds:
@@ -260,7 +258,6 @@ MonoBehaviour:
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
restNormals: []
orientations: []
restOrientations: []
velocities:
@@ -1382,357 +1379,7 @@ MonoBehaviour:
shapeMatchingConstraintsData:
batches: []
aerodynamicConstraintsData:
batches:
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000
m_ConstraintCount: 112
m_ActiveConstraintCount: 12
m_InitialActiveConstraintCount: 12
particleIndices:
serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
aerodynamicCoeffs:
serializedContents:
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.19999999
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
m_AlignBytes: 16
batches: []
chainConstraintsData:
batches: []
volumeConstraintsData:
@@ -1818,7 +1465,6 @@ MonoBehaviour:
m_InterParticleDistance: 0.1833847
totalParticles: 112
m_RestLength: 20.355694
deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b000000
restLengths:
- 0.18298253
- 0.18343952

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 4d31372b30ca34527b534f09a803ab15
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 04076b9483b7f4ab0a01666d8b2c24cc
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -26,9 +26,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3}
m_Name: Tearable cable
m_EditorClassIdentifier:
m_Checksum: 772348344
m_Empty: 0
m_Edited: 0
m_ActiveParticleCount: 12
m_InitialActiveParticleCount: 12
_bounds:
@@ -260,7 +258,6 @@ MonoBehaviour:
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
restNormals: []
orientations: []
restOrientations: []
velocities:
@@ -1382,357 +1379,7 @@ MonoBehaviour:
shapeMatchingConstraintsData:
batches: []
aerodynamicConstraintsData:
batches:
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000
m_ConstraintCount: 112
m_ActiveConstraintCount: 12
m_InitialActiveConstraintCount: 12
particleIndices:
serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
aerodynamicCoeffs:
serializedContents:
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
m_AlignBytes: 16
batches: []
chainConstraintsData:
batches: []
volumeConstraintsData:
@@ -1882,7 +1529,6 @@ MonoBehaviour:
m_InterParticleDistance: 0.18181817
totalParticles: 112
m_RestLength: 20.181805
deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b000000
restLengths:
- 0.18198538
- 0.18199486

View File

@@ -40,9 +40,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3}
m_Name: Very long cable
m_EditorClassIdentifier:
m_Checksum: 3372886816
m_Empty: 0
m_Edited: 0
m_ActiveParticleCount: 22
m_InitialActiveParticleCount: 22
_bounds:
@@ -294,7 +292,6 @@ MonoBehaviour:
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
- {x: 0, y: 0, z: 0, w: 0}
restNormals: []
orientations: []
restOrientations: []
velocities:
@@ -1506,387 +1503,7 @@ MonoBehaviour:
shapeMatchingConstraintsData:
batches: []
aerodynamicConstraintsData:
batches:
- m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f00000070000000710000007200000073000000740000007500000076000000770000007800000079000000
m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f00000070000000710000007200000073000000740000007500000076000000770000007800000079000000
m_ConstraintCount: 122
m_ActiveConstraintCount: 22
m_InitialActiveConstraintCount: 22
particleIndices:
serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f00000070000000710000007200000073000000740000007500000076000000770000007800000079000000
m_AlignBytes: 16
lambdas:
serializedContents: []
m_AlignBytes: 16
aerodynamicCoeffs:
serializedContents:
- 0.2
- 1
- 1
- 0.19999999
- 1
- 1
- 0.20000003
- 1
- 1
- 0.19999999
- 1
- 1
- 0.2
- 1
- 1
- 0.19999999
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.20000003
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0.2
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
- 0
- 1
- 1
m_AlignBytes: 16
batches: []
chainConstraintsData:
batches: []
volumeConstraintsData:
@@ -1972,7 +1589,6 @@ MonoBehaviour:
m_InterParticleDistance: 0.19118178
totalParticles: 122
m_RestLength: 23.132986
deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f0000001000000010000000110000001100000012000000120000001300000013000000140000001400000015000000
restLengths:
- 0.19104075
- 0.18882072

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 47284b33117284d61b3df44d2620531e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: b6dc10b6408e440aaa60cfca8e7dd7d1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7e05f85bfaeb24a649317f63f656b6bb
guid: 4d31372b30ca34527b534f09a803ab15
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000

View File

@@ -15,7 +15,7 @@ Material:
- _EMISSION
m_InvalidKeywords: []
m_LightmapFlags: 1
m_EnableInstancingVariants: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}

View File

@@ -15,7 +15,7 @@ Material:
- _EMISSION
m_InvalidKeywords: []
m_LightmapFlags: 1
m_EnableInstancingVariants: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}

View File

@@ -84,7 +84,7 @@ Material:
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.17942329, g: 0.6037736, b: 0.19514, a: 1}
- _Color: {r: 0.17283745, g: 0.8161765, b: 0.12002597, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}

View File

@@ -1,85 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Shark
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _NORMALMAP
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 2800000, guid: e4a9139c969c3419a813c9513127f817, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 9c47de74aec0642928f43bb91a7346b7, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.75
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: ad417cd62ee7d4209afa3e3d86bee647
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,84 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TanglePeg
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.8
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 0.7734498, b: 0, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: bcdcc68772c3b42ca94abeffddf3eb19
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -1,105 +0,0 @@
fileFormatVersion: 2
guid: 92fe50136a7db4cc7bf5dceedcfc586e
ModelImporter:
serializedVersion: 21202
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 1
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5b9c84cdb747944209b1c8753933c5db, type: 3}
m_Name: SnakeBamboo
m_EditorClassIdentifier:
dynamicFriction: 0.2
dynamicFriction: 0.3
staticFriction: 0
stickiness: 0
stickDistance: 0

View File

@@ -12,9 +12,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5b9c84cdb747944209b1c8753933c5db, type: 3}
m_Name: SnakeBody
m_EditorClassIdentifier:
dynamicFriction: 0.2
dynamicFriction: 0.1
staticFriction: 0
stickiness: 0.01
stickiness: 0.02
stickDistance: 0.01
frictionCombine: 3
stickinessCombine: 3

View File

@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5b9c84cdb747944209b1c8753933c5db, type: 3}
m_Name: SnakeFloor
m_EditorClassIdentifier:
dynamicFriction: 1.2
dynamicFriction: 0.7
staticFriction: 0
stickiness: 0
stickDistance: 0

View File

@@ -1,228 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3512526509595786538
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3512526509595786583}
- component: {fileID: 2838414990970241973}
- component: {fileID: 8733900141329501594}
- component: {fileID: 348212794980533237}
- component: {fileID: 9130168360642288785}
- component: {fileID: 4552180186810924025}
m_Layer: 0
m_Name: TanglePeg
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3512526509595786583
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3512526509595786538}
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: 4367317764625006663}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!54 &2838414990970241973
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3512526509595786538}
serializedVersion: 5
m_Mass: 5
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: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 112
m_CollisionDetection: 0
--- !u!114 &8733900141329501594
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3512526509595786538}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: beb10e70cc06a4b019ecf88348a5f7fa, type: 3}
m_Name:
m_EditorClassIdentifier:
currentSlot: {fileID: 0}
floorCollider: {fileID: 0}
attachedRope: {fileID: 0}
stiffness: 200
damping: 20
maxAccel: 50
minDistance: 0.05
--- !u!136 &348212794980533237
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3512526509595786538}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.4
m_Height: 1.1
m_Direction: 1
m_Center: {x: 0.000000059604645, y: 0, z: -0.00000008940697}
--- !u!114 &9130168360642288785
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3512526509595786538}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3}
m_Name:
m_EditorClassIdentifier:
thickness: 0
inverted: 0
material: {fileID: 0}
filter: -65534
m_SourceCollider: {fileID: 348212794980533237}
m_DistanceField: {fileID: 0}
--- !u!114 &4552180186810924025
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3512526509595786538}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 62359d80fdc0e4315ab6331b78ec5b90, type: 3}
m_Name:
m_EditorClassIdentifier:
kinematicForParticles: 0
--- !u!1 &3782235798457470433
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4367317764625006663}
- component: {fileID: 8070882573767540436}
- component: {fileID: 7140162020897419162}
m_Layer: 0
m_Name: GameObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4367317764625006663
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3782235798457470433}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.2, z: 0}
m_LocalScale: {x: 0.8, y: 0.2, z: 0.8}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3512526509595786583}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &8070882573767540436
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3782235798457470433}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &7140162020897419162
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3782235798457470433}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: bcdcc68772c3b42ca94abeffddf3eb19, type: 2}
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_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,106 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3512526509595786538
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3512526509595786583}
- component: {fileID: 3512526509595786582}
- component: {fileID: 3512526509595786581}
- component: {fileID: 8518691974497511176}
m_Layer: 0
m_Name: TanglePegSlot
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3512526509595786583
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3512526509595786538}
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: 0.05, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &3512526509595786582
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3512526509595786538}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &3512526509595786581
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3512526509595786538}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: d402dacd6333443e5926c03c59b7b0ad, type: 2}
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_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!114 &8518691974497511176
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3512526509595786538}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 866212c246a9c4c5797069099ad745aa, type: 3}
m_Name:
m_EditorClassIdentifier:
currentPeg: {fileID: 0}
tintColor: {r: 1, g: 0.8207643, b: 0.18396229, a: 1}

View File

@@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: aa6b142bbb2bb4887bebe33010c84c6c
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -69,7 +69,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 03019be2b7a654429bf322c3ca0c7a0e, type: 2}
- {fileID: 2100000, guid: d402dacd6333443e5926c03c59b7b0ad, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
@@ -128,7 +128,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
thickness: 0
inverted: 0
material: {fileID: 0}
filter: -65535
m_SourceCollider: {fileID: 3512526509595786580}

View File

@@ -1,33 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Obi.Samples
{
public class CableCarController : MonoBehaviour
{
public ObiPinhole pinhole;
public float carSpeed = 1;
// Update is called once per frame
void Update()
{
float speed = 0;
if (Input.GetKey(KeyCode.W))
{
speed = carSpeed;
}
if (Input.GetKey(KeyCode.S))
{
speed = -carSpeed;
}
pinhole.motorSpeed = speed;
if (Input.GetKeyDown(KeyCode.Space))
{
pinhole.friction = pinhole.friction > 0.5f ? 0 : 1;
}
}
}
}

View File

@@ -2,78 +2,27 @@
using System.Collections.Generic;
using UnityEngine;
namespace Obi.Samples
{
public class CharacterControl2D : MonoBehaviour
{
public class CharacterControl2D : MonoBehaviour {
public float floorRaycastDistance = 1.2f;
public float acceleration = 10;
public float maxSpeed = 8;
public float jumpPower = 2;
[Header("Grounded")]
public float acceleration = 80;
public float maxSpeed = 6;
public float damping = 0.005f;
public float jumpPower = 10;
private Rigidbody unityRigidbody;
public void Awake(){
unityRigidbody = GetComponent<Rigidbody>();
}
[Header("Airborne")]
public float airAcceleration = 16;
public float airMaxSpeed = 12;
public float extraGravity = -12;
void FixedUpdate () {
[Header("Auto upright")]
public Vector3 centerOfMass = new Vector3(0, -0.25f, 0);
public float P = 2;
public float D = 0.1f;
private Rigidbody unityRigidbody;
private float axis;
private bool grounded;
private float error;
private float prevError;
public void Awake()
{
unityRigidbody = GetComponent<Rigidbody>();
unityRigidbody.centerOfMass = centerOfMass;
}
private void Update()
{
axis = Input.GetAxisRaw("Horizontal");
grounded = Physics.Raycast(new Ray(transform.position, -Vector3.up), floorRaycastDistance);
if (Input.GetButtonDown("Jump") && grounded)
unityRigidbody.AddForce(Vector3.up * jumpPower, ForceMode.VelocityChange);
}
private void FixedUpdate()
{
var velocity = unityRigidbody.linearVelocity;
prevError = error;
error = Vector3.SignedAngle(unityRigidbody.transform.up, Vector3.up, Vector3.forward);
if (grounded)
{
float accel = axis * acceleration * Time.deltaTime;
if ((velocity.x < maxSpeed && accel > 0) || (velocity.x > -maxSpeed && accel < 0))
velocity.x += accel;
if (Mathf.Approximately(axis, 0))
velocity.x *= Mathf.Pow(damping, Time.deltaTime);
unityRigidbody.AddTorque(new Vector3(0, 0, error * P + (error - prevError) / Time.deltaTime * D));
}
else
{
float accel = axis * airAcceleration * Time.deltaTime;
if ((velocity.x < airMaxSpeed && accel > 0) || (velocity.x > -airMaxSpeed && accel < 0))
velocity.x += accel;
velocity.y += extraGravity * Time.deltaTime;
}
unityRigidbody.linearVelocity = velocity;
}
}
}
unityRigidbody.AddForce(new Vector3(Input.GetAxis("Horizontal")*acceleration,0,0));
unityRigidbody.linearVelocity = Vector3.ClampMagnitude(unityRigidbody.linearVelocity,maxSpeed);
if (Input.GetButtonDown("Jump")){
unityRigidbody.AddForce(Vector3.up * jumpPower,ForceMode.VelocityChange);
}
}
}

View File

@@ -1,46 +1,36 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Obi;
namespace Obi.Samples
{
public class CraneController : MonoBehaviour
{
public class CraneController : MonoBehaviour {
ObiRopeCursor cursor;
ObiRope rope;
public float speed = 1;
ObiRopeCursor cursor;
ObiRope rope;
// Use this for initialization
void Start()
{
cursor = GetComponentInChildren<ObiRopeCursor>();
rope = cursor.GetComponent<ObiRope>();
}
// Use this for initialization
void Start () {
cursor = GetComponentInChildren<ObiRopeCursor>();
rope = cursor.GetComponent<ObiRope>();
}
// Update is called once per frame
void Update () {
if (Input.GetKey(KeyCode.W)){
if (rope.restLength > 6.5f)
cursor.ChangeLength(rope.restLength - 1f * Time.deltaTime);
}
// Update is called once per frame
void Update()
{
if (Input.GetKey(KeyCode.W))
{
if (rope.restLength > 6.5f)
cursor.ChangeLength(-speed * Time.deltaTime);
}
if (Input.GetKey(KeyCode.S)){
cursor.ChangeLength(rope.restLength + 1f * Time.deltaTime);
}
if (Input.GetKey(KeyCode.S))
{
cursor.ChangeLength(speed * Time.deltaTime);
}
if (Input.GetKey(KeyCode.A)){
transform.Rotate(0,Time.deltaTime*15f,0);
}
if (Input.GetKey(KeyCode.A))
{
transform.Rotate(0, Time.deltaTime * 15f, 0);
}
if (Input.GetKey(KeyCode.D))
{
transform.Rotate(0, -Time.deltaTime * 15f, 0);
}
}
}
}
if (Input.GetKey(KeyCode.D)){
transform.Rotate(0,-Time.deltaTime*15f,0);
}
}
}

View File

@@ -1,53 +1,45 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Obi;
namespace Obi.Samples
[RequireComponent(typeof(ObiRope))]
public class CursorController : MonoBehaviour
{
[RequireComponent(typeof(ObiRope))]
public class CursorController : MonoBehaviour
ObiRopeCursor cursor;
ObiRope rope;
public float minLength = 0.1f;
public float speed = 1;
// Use this for initialization
void Start ()
{
public float minLength = 0.1f;
public float speed = 1;
private ObiRopeCursor cursor;
private ObiRope rope;
void OnEnable()
rope = GetComponent<ObiRope>();
cursor = GetComponent<ObiRopeCursor>();
}
// Update is called once per frame
void Update ()
{
if (Input.GetKey(KeyCode.W) && cursor != null)
{
rope = GetComponent<ObiRope>();
cursor = GetComponent<ObiRopeCursor>();
}
if (rope.restLength > minLength)
cursor.ChangeLength(rope.restLength - speed * Time.deltaTime);
}
void Update()
if (Input.GetKey(KeyCode.S) && cursor != null)
{
float change = 0;
cursor.ChangeLength(rope.restLength + speed * Time.deltaTime);
}
if (Input.GetKey(KeyCode.W) && cursor != null)
{
change -= speed * Time.deltaTime;
}
if (Input.GetKey(KeyCode.A)){
rope.transform.Translate(Vector3.left * Time.deltaTime,Space.World);
}
if (Input.GetKey(KeyCode.S) && cursor != null)
{
change += speed * Time.deltaTime;
}
if (Input.GetKey(KeyCode.D)){
rope.transform.Translate(Vector3.right * Time.deltaTime,Space.World);
}
if (rope.restLength + change < minLength)
change = minLength - rope.restLength;
cursor.ChangeLength(change);
if (Input.GetKey(KeyCode.A))
{
rope.transform.Translate(Vector3.left * Time.deltaTime, Space.World);
}
if (Input.GetKey(KeyCode.D))
{
rope.transform.Translate(Vector3.right * Time.deltaTime, Space.World);
}
}
}
}
}

View File

@@ -1,7 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Obi;
/**
* Sample component that shows how to use Obi Rope to create a grappling hook for a 2.5D game.
@@ -15,213 +15,199 @@ using UnityEngine;
* If complex interaction is required with the scene, a purely geometry-based approach (ala Worms ninja rope) can
* be the right choice under certain circumstances.
*/
namespace Obi.Samples
public class ExtendableGrapplingHook : MonoBehaviour
{
public class ExtendableGrapplingHook : MonoBehaviour
public ObiSolver solver;
public ObiCollider character;
public Material material;
public ObiRopeSection section;
[Range(0, 1)]
public float hookResolution = 0.5f;
public float hookExtendRetractSpeed = 2;
public float hookShootSpeed = 30;
public int particlePoolSize = 100;
private ObiRope rope;
private ObiRopeBlueprint blueprint;
private ObiRopeExtrudedRenderer ropeRenderer;
private ObiRopeCursor cursor;
private RaycastHit hookAttachment;
void Awake()
{
public ObiSolver solver;
public ObiCollider character;
// Create both the rope and the solver:
rope = gameObject.AddComponent<ObiRope>();
ropeRenderer = gameObject.AddComponent<ObiRopeExtrudedRenderer>();
ropeRenderer.section = section;
ropeRenderer.uvScale = new Vector2(1, 4);
ropeRenderer.normalizeV = false;
ropeRenderer.uvAnchor = 1;
rope.GetComponent<MeshRenderer>().material = material;
public Material material;
public ObiRopeSection section;
// Setup a blueprint for the rope:
blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
blueprint.resolution = 0.5f;
blueprint.pooledParticles = particlePoolSize;
[Range(0, 1)]
public float hookResolution = 0.5f;
public float hookExtendRetractSpeed = 2;
public float hookShootSpeed = 30;
public int particlePoolSize = 100;
// Tweak rope parameters:
rope.maxBending = 0.02f;
private ObiRope rope;
private ObiRopeBlueprint blueprint;
private ObiRopeExtrudedRenderer ropeRenderer;
// Add a cursor to be able to change rope length:
cursor = rope.gameObject.AddComponent<ObiRopeCursor>();
cursor.cursorMu = 0;
cursor.direction = true;
}
private ObiRopeCursor cursor;
private void OnDestroy()
{
DestroyImmediate(blueprint);
}
private RaycastHit hookAttachment;
/**
* Raycast against the scene to see if we can attach the hook to something.
*/
private void LaunchHook()
{
void Awake()
// Get the mouse position in the scene, in the same XY plane as this object:
Vector3 mouse = Input.mousePosition;
mouse.z = transform.position.z - Camera.main.transform.position.z;
Vector3 mouseInScene = Camera.main.ScreenToWorldPoint(mouse);
// Get a ray from the character to the mouse:
Ray ray = new Ray(transform.position, mouseInScene - transform.position);
// Raycast to see what we hit:
if (Physics.Raycast(ray, out hookAttachment))
{
// Create both the rope and the solver:
rope = gameObject.AddComponent<ObiRope>();
ropeRenderer = gameObject.AddComponent<ObiRopeExtrudedRenderer>();
ropeRenderer.section = section;
ropeRenderer.uvScale = new Vector2(1, 4);
ropeRenderer.normalizeV = false;
ropeRenderer.uvAnchor = 1;
ropeRenderer.material = material;
// Setup a blueprint for the rope:
blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
blueprint.resolution = 0.5f;
blueprint.pooledParticles = particlePoolSize;
// Tweak rope parameters:
rope.maxBending = 0.02f;
// Add a cursor to be able to change rope length:
cursor = rope.gameObject.AddComponent<ObiRopeCursor>();
cursor.cursorMu = 0;
cursor.direction = true;
// We actually hit something, so attach the hook!
StartCoroutine(AttachHook());
}
private void OnDestroy()
}
private IEnumerator AttachHook()
{
yield return null;
// Clear pin constraints:
var pinConstraints = rope.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints<ObiPinConstraintsBatch>;
pinConstraints.Clear();
Vector3 localHit = rope.transform.InverseTransformPoint(hookAttachment.point);
// Procedurally generate the rope path (just a short segment, as we will extend it over time):
int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 0);
blueprint.path.Clear();
blueprint.path.AddControlPoint(Vector3.zero, Vector3.zero, Vector3.zero, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook start");
blueprint.path.AddControlPoint(localHit.normalized * 0.5f, Vector3.zero, Vector3.zero, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook end");
blueprint.path.FlushEvents();
// Generate the particle representation of the rope (wait until it has finished):
yield return blueprint.Generate();
// Set the blueprint (this adds particles/constraints to the solver and starts simulating them).
rope.ropeBlueprint = blueprint;
// wait one frame:
yield return null;
rope.GetComponent<MeshRenderer>().enabled = true;
// set masses to zero, as we're going to override positions while we extend the rope:
for (int i = 0; i < rope.activeParticleCount; ++i)
solver.invMasses[rope.solverIndices[i]] = 0;
float currentLength = 0;
// while the last particle hasn't reached the hit, extend the rope:
while (true)
{
DestroyImmediate(blueprint);
}
// calculate rope origin in solver space:
Vector3 origin = solver.transform.InverseTransformPoint(rope.transform.position);
/**
* Raycast against the scene to see if we can attach the hook to something.
*/
private void LaunchHook()
{
// update direction and distance to hook point:
Vector3 direction = hookAttachment.point - origin;
float distance = direction.magnitude;
direction.Normalize();
// Get the mouse position in the scene, in the same XY plane as this object:
Vector3 mouse = Input.mousePosition;
mouse.z = transform.position.z - Camera.main.transform.position.z;
Vector3 mouseInScene = Camera.main.ScreenToWorldPoint(mouse);
// increase length:
currentLength += hookShootSpeed * Time.deltaTime;
// Get a ray from the character to the mouse:
Ray ray = new Ray(transform.position, mouseInScene - transform.position);
// Raycast to see what we hit:
if (Physics.Raycast(ray, out hookAttachment))
// if we have reached the desired length, break the loop:
if (currentLength >= distance)
{
// We actually hit something, so attach the hook!
StartCoroutine(AttachHook());
cursor.ChangeLength(distance);
break;
}
}
// change rope length (clamp to distance between rope origin and hook to avoid overshoot)
cursor.ChangeLength(Mathf.Min(distance, currentLength));
private void LayParticlesInStraightLine(Vector3 origin, Vector3 direction)
{
// placing all particles in a straight line, respecting rope length
// iterate over all particles in sequential order, placing them in a straight line while
// respecting element length:
float length = 0;
for (int i = 0; i < rope.elements.Count; ++i)
{
int p1 = rope.elements[i].particle1;
int p2 = rope.elements[i].particle2;
solver.prevPositions[p1] = solver.positions[p1] = origin + direction * length;
solver.positions[rope.elements[i].particle1] = origin + direction * length;
solver.positions[rope.elements[i].particle2] = origin + direction * (length + rope.elements[i].restLength);
length += rope.elements[i].restLength;
solver.prevPositions[p2] = solver.positions[p2] = origin + direction * length;
}
}
private IEnumerator AttachHook()
{
yield return null;
// Clear pin constraints:
var pinConstraints = rope.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints<ObiPinConstraintsBatch>;
pinConstraints.Clear();
Vector3 localHit = rope.transform.InverseTransformPoint(hookAttachment.point);
// Procedurally generate the rope path (just a short segment, as we will extend it over time):
int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 0);
blueprint.path.Clear();
blueprint.path.AddControlPoint(Vector3.zero, Vector3.zero, Vector3.zero, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook start");
blueprint.path.AddControlPoint(localHit.normalized * 0.5f, Vector3.zero, Vector3.zero, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook end");
blueprint.path.FlushEvents();
// Generate the particle representation of the rope (wait until it has finished):
yield return blueprint.Generate();
// Set the blueprint (this adds particles/constraints to the solver and starts simulating them).
rope.ropeBlueprint = blueprint;
rope.GetComponent<ObiRopeExtrudedRenderer>().enabled = true;
// wait for the solver to load the rope, after the next physics step:
yield return new WaitForFixedUpdate();
yield return null;
// set masses to zero, as we're going to override positions while we extend the rope:
for (int i = 0; i < rope.activeParticleCount; ++i)
solver.invMasses[rope.solverIndices[i]] = 0;
// while the last particle hasn't reached the hit, extend the rope:
Vector3 origin;
Vector3 direction;
while (true)
{
// calculate rope origin in solver space:
origin = solver.transform.InverseTransformPoint(rope.transform.position);
// update direction and distance to hook point:
direction = solver.transform.InverseTransformPoint(hookAttachment.point) - origin;
float distance = direction.magnitude;
direction.Normalize();
LayParticlesInStraightLine(origin, direction);
// increase length:
float distanceLeft = distance - cursor.ChangeLength(hookShootSpeed * Time.deltaTime);
// if we have exceeded the desired length, correct it and break the loop:
if (distanceLeft < 0)
{
cursor.ChangeLength(distanceLeft);
break;
}
// wait for next frame:
yield return null;
}
// wait for the last length change to take effect, and ensure the rope is straight:
yield return new WaitForFixedUpdate();
// wait one frame:
yield return null;
LayParticlesInStraightLine(origin, direction);
// restore masses so that the simulation takes over now that the rope is in place:
for (int i = 0; i < rope.activeParticleCount; ++i)
solver.invMasses[rope.solverIndices[i]] = 10; // 1/0.1 = 10
// Pin both ends of the rope (this enables two-way interaction between character and rope):
var batch = new ObiPinConstraintsBatch();
batch.AddConstraint(rope.elements[0].particle1, character, transform.localPosition, Quaternion.identity, 0, 0);
batch.AddConstraint(rope.elements[rope.elements.Count - 1].particle2, hookAttachment.collider.GetComponent<ObiColliderBase>(),
hookAttachment.collider.transform.InverseTransformPoint(hookAttachment.point), Quaternion.identity, 0, 0);
batch.activeConstraintCount = 2;
pinConstraints.AddBatch(batch);
rope.SetConstraintsDirty(Oni.ConstraintType.Pin);
}
private void DetachHook()
// restore masses so that the simulation takes over now that the rope is in place:
for (int i = 0; i < rope.activeParticleCount; ++i)
solver.invMasses[rope.solverIndices[i]] = 10; // 1/0.1 = 10
// Pin both ends of the rope (this enables two-way interaction between character and rope):
var batch = new ObiPinConstraintsBatch();
batch.AddConstraint(rope.elements[0].particle1, character, transform.localPosition, Quaternion.identity, 0, 0, float.PositiveInfinity);
batch.AddConstraint(rope.elements[rope.elements.Count-1].particle2, hookAttachment.collider.GetComponent<ObiColliderBase>(),
hookAttachment.collider.transform.InverseTransformPoint(hookAttachment.point), Quaternion.identity, 0, 0, float.PositiveInfinity);
batch.activeConstraintCount = 2;
pinConstraints.AddBatch(batch);
rope.SetConstraintsDirty(Oni.ConstraintType.Pin);
}
private void DetachHook()
{
// Set the rope blueprint to null (automatically removes the previous blueprint from the solver, if any).
rope.ropeBlueprint = null;
rope.GetComponent<MeshRenderer>().enabled = false;
}
void Update()
{
if (Input.GetMouseButtonDown(0))
{
// Set the rope blueprint to null (automatically removes the previous blueprint from the solver, if any).
rope.ropeBlueprint = null;
rope.GetComponent<ObiRopeExtrudedRenderer>().enabled = false;
if (!rope.isLoaded)
LaunchHook();
else
DetachHook();
}
void Update()
if (rope.isLoaded)
{
if (Input.GetMouseButtonDown(0))
if (Input.GetKey(KeyCode.W))
{
if (!rope.isLoaded)
LaunchHook();
else
DetachHook();
cursor.ChangeLength(rope.restLength - hookExtendRetractSpeed * Time.deltaTime);
}
if (rope.isLoaded)
if (Input.GetKey(KeyCode.S))
{
if (Input.GetKey(KeyCode.W))
{
cursor.ChangeLength(-hookExtendRetractSpeed * Time.deltaTime);
}
if (Input.GetKey(KeyCode.S))
{
cursor.ChangeLength(hookExtendRetractSpeed * Time.deltaTime);
}
cursor.ChangeLength(rope.restLength + hookExtendRetractSpeed * Time.deltaTime);
}
}
}
}
}

View File

@@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Obi;
/**
* Sample component that shows how to use Obi Rope to create a grappling hook for a 2.5D game.
@@ -14,142 +15,138 @@ using UnityEngine;
* If complex interaction is required with the scene, a purely geometry-based approach (ala Worms ninja rope) can
* be the right choice under certain circumstances.
*/
namespace Obi.Samples
public class GrapplingHook : MonoBehaviour
{
public class GrapplingHook : MonoBehaviour
public ObiSolver solver;
public ObiCollider character;
public float hookExtendRetractSpeed = 2;
public Material material;
public ObiRopeSection section;
private ObiRope rope;
private ObiRopeBlueprint blueprint;
private ObiRopeExtrudedRenderer ropeRenderer;
private ObiRopeCursor cursor;
private RaycastHit hookAttachment;
void Awake()
{
public ObiSolver solver;
public ObiCollider character;
public float hookExtendRetractSpeed = 2;
public Material material;
public ObiRopeSection section;
// Create both the rope and the solver:
rope = gameObject.AddComponent<ObiRope>();
ropeRenderer = gameObject.AddComponent<ObiRopeExtrudedRenderer>();
ropeRenderer.section = section;
ropeRenderer.uvScale = new Vector2(1, 4);
ropeRenderer.normalizeV = false;
ropeRenderer.uvAnchor = 1;
rope.GetComponent<MeshRenderer>().material = material;
private ObiRope rope;
private ObiRopeBlueprint blueprint;
private ObiRopeExtrudedRenderer ropeRenderer;
// Setup a blueprint for the rope:
blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
blueprint.resolution = 0.5f;
private ObiRopeCursor cursor;
// Tweak rope parameters:
rope.maxBending = 0.02f;
private RaycastHit hookAttachment;
// Add a cursor to be able to change rope length:
cursor = rope.gameObject.AddComponent<ObiRopeCursor>();
cursor.cursorMu = 0;
cursor.direction = true;
}
void Awake()
private void OnDestroy()
{
DestroyImmediate(blueprint);
}
/**
* Raycast against the scene to see if we can attach the hook to something.
*/
private void LaunchHook()
{
// Get the mouse position in the scene, in the same XY plane as this object:
Vector3 mouse = Input.mousePosition;
mouse.z = transform.position.z - Camera.main.transform.position.z;
Vector3 mouseInScene = Camera.main.ScreenToWorldPoint(mouse);
// Get a ray from the character to the mouse:
Ray ray = new Ray(transform.position, mouseInScene - transform.position);
// Raycast to see what we hit:
if (Physics.Raycast(ray, out hookAttachment))
{
// Create both the rope and the solver:
rope = gameObject.AddComponent<ObiRope>();
ropeRenderer = gameObject.AddComponent<ObiRopeExtrudedRenderer>();
ropeRenderer.section = section;
ropeRenderer.uvScale = new Vector2(1, 4);
ropeRenderer.normalizeV = false;
ropeRenderer.uvAnchor = 1;
rope.GetComponent<MeshRenderer>().material = material;
// Setup a blueprint for the rope:
blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
blueprint.resolution = 0.5f;
// Tweak rope parameters:
rope.maxBending = 0.02f;
// Add a cursor to be able to change rope length:
cursor = rope.gameObject.AddComponent<ObiRopeCursor>();
cursor.cursorMu = 0;
cursor.direction = true;
// We actually hit something, so attach the hook!
StartCoroutine(AttachHook());
}
private void OnDestroy()
}
private IEnumerator AttachHook()
{
yield return 0;
Vector3 localHit = rope.transform.InverseTransformPoint(hookAttachment.point);
int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything,0);
// Procedurally generate the rope path (a simple straight line):
blueprint.path.Clear();
blueprint.path.AddControlPoint(Vector3.zero, -localHit.normalized, localHit.normalized, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook start");
blueprint.path.AddControlPoint(localHit, -localHit.normalized, localHit.normalized, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook end");
blueprint.path.FlushEvents();
// Generate the particle representation of the rope (wait until it has finished):
yield return blueprint.Generate();
// Set the blueprint (this adds particles/constraints to the solver and starts simulating them).
rope.ropeBlueprint = blueprint;
rope.GetComponent<MeshRenderer>().enabled = true;
// Pin both ends of the rope (this enables two-way interaction between character and rope):
var pinConstraints = rope.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints<ObiPinConstraintsBatch>;
pinConstraints.Clear();
var batch = new ObiPinConstraintsBatch();
batch.AddConstraint(rope.solverIndices[0], character, transform.localPosition, Quaternion.identity, 0, 0, float.PositiveInfinity);
batch.AddConstraint(rope.solverIndices[blueprint.activeParticleCount - 1], hookAttachment.collider.GetComponent<ObiColliderBase>(),
hookAttachment.collider.transform.InverseTransformPoint(hookAttachment.point), Quaternion.identity, 0, 0, float.PositiveInfinity);
batch.activeConstraintCount = 2;
pinConstraints.AddBatch(batch);
rope.SetConstraintsDirty(Oni.ConstraintType.Pin);
}
private void DetachHook()
{
// Set the rope blueprint to null (automatically removes the previous blueprint from the solver, if any).
rope.ropeBlueprint = null;
rope.GetComponent<MeshRenderer>().enabled = false;
}
void Update()
{
if (Input.GetMouseButtonDown(0))
{
DestroyImmediate(blueprint);
if (!rope.isLoaded)
LaunchHook();
else
DetachHook();
}
/**
* Raycast against the scene to see if we can attach the hook to something.
*/
private void LaunchHook()
if (rope.isLoaded)
{
// Get the mouse position in the scene, in the same XY plane as this object:
Vector3 mouse = Input.mousePosition;
mouse.z = transform.position.z - Camera.main.transform.position.z;
Vector3 mouseInScene = Camera.main.ScreenToWorldPoint(mouse);
// Get a ray from the character to the mouse:
Ray ray = new Ray(transform.position, mouseInScene - transform.position);
// Raycast to see what we hit:
if (Physics.Raycast(ray, out hookAttachment))
if (Input.GetKey(KeyCode.W))
{
// We actually hit something, so attach the hook!
StartCoroutine(AttachHook());
cursor.ChangeLength(rope.restLength - hookExtendRetractSpeed * Time.deltaTime);
}
}
private IEnumerator AttachHook()
{
yield return 0;
Vector3 localHit = rope.transform.InverseTransformPoint(hookAttachment.point);
int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 0);
// Procedurally generate the rope path (a simple straight line):
blueprint.path.Clear();
blueprint.path.AddControlPoint(Vector3.zero, -localHit.normalized, localHit.normalized, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook start");
blueprint.path.AddControlPoint(localHit, -localHit.normalized, localHit.normalized, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook end");
blueprint.path.FlushEvents();
// Generate the particle representation of the rope (wait until it has finished):
yield return blueprint.Generate();
// Set the blueprint (this adds particles/constraints to the solver and starts simulating them).
rope.ropeBlueprint = blueprint;
rope.GetComponent<MeshRenderer>().enabled = true;
// Pin both ends of the rope (this enables two-way interaction between character and rope):
var pinConstraints = rope.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints<ObiPinConstraintsBatch>;
pinConstraints.Clear();
var batch = new ObiPinConstraintsBatch();
batch.AddConstraint(rope.solverIndices[0], character, transform.localPosition, Quaternion.identity, 0, 0);
batch.AddConstraint(rope.solverIndices[blueprint.activeParticleCount - 1], hookAttachment.collider.GetComponent<ObiColliderBase>(),
hookAttachment.collider.transform.InverseTransformPoint(hookAttachment.point), Quaternion.identity, 0, 0);
batch.activeConstraintCount = 2;
pinConstraints.AddBatch(batch);
rope.SetConstraintsDirty(Oni.ConstraintType.Pin);
}
private void DetachHook()
{
// Set the rope blueprint to null (automatically removes the previous blueprint from the solver, if any).
rope.ropeBlueprint = null;
rope.GetComponent<MeshRenderer>().enabled = false;
}
void Update()
{
if (Input.GetMouseButtonDown(0))
if (Input.GetKey(KeyCode.S))
{
if (!rope.isLoaded)
LaunchHook();
else
DetachHook();
}
if (rope.isLoaded)
{
if (Input.GetKey(KeyCode.W))
{
cursor.ChangeLength(rope.restLength - hookExtendRetractSpeed * Time.deltaTime);
}
if (Input.GetKey(KeyCode.S))
{
cursor.ChangeLength(rope.restLength + hookExtendRetractSpeed * Time.deltaTime);
}
cursor.ChangeLength(rope.restLength + hookExtendRetractSpeed * Time.deltaTime);
}
}
}
}
}

View File

@@ -1,15 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Obi.Samples
{
public class HighlightCollidingRopes : MonoBehaviour
{
public void Highlight(ActorActorCollisionDetector.ActorPair pair)
{
if (pair.actorA.TryGetComponent(out ActorBlinker blinkerA)) blinkerA.Blink(pair.particleA);
if (pair.actorB.TryGetComponent(out ActorBlinker blinkerB)) blinkerB.Blink(pair.particleB);
}
}
}

View File

@@ -1,84 +1,83 @@
using UnityEngine;
using Obi;
namespace Obi.Samples
{
[RequireComponent(typeof(ObiRope))]
public class HosePump : MonoBehaviour
[RequireComponent(typeof(ObiRope))]
public class HosePump : MonoBehaviour {
[Header("Bulge controls")]
public float pumpSpeed = 5;
public float bulgeFrequency = 3;
public float baseThickness = 0.04f;
public float bulgeThickness = 0.06f;
public Color bulgeColor = Color.cyan;
[Header("Flow controls")]
public ParticleSystem waterEmitter;
public float flowSpeedMin = 0.5f;
public float flowSpeedMax = 7;
public float minEmitRate = 100;
public float maxEmitRate = 1000;
private ObiRope rope;
public ObiPathSmoother smoother;
private float time = 0;
void OnEnable()
{
rope = GetComponent<ObiRope>();
smoother = GetComponent<ObiPathSmoother>();
rope.OnBeginStep += Rope_OnBeginStep;
}
void OnDisable()
{
rope.OnBeginStep -= Rope_OnBeginStep;
}
[Header("Bulge controls")]
public float pumpSpeed = 5;
public float bulgeFrequency = 3;
public float baseThickness = 0.04f;
public float bulgeThickness = 0.06f;
public Color bulgeColor = Color.cyan;
private void Rope_OnBeginStep(ObiActor actor, float stepTime)
{
time += stepTime * pumpSpeed;
[Header("Flow controls")]
public ParticleSystem waterEmitter;
public float flowSpeedMin = 0.5f;
public float flowSpeedMax = 7;
public float minEmitRate = 100;
public float maxEmitRate = 1000;
float distance = 0;
float sine = 0;
private ObiRope rope;
public ObiPathSmoother smoother;
private float time = 0;
void OnEnable()
// iterate over all particles, changing their radius and color based on a sine wave:
// (note this would not support resizable / cuttable ropes, to add support for that use rope.elements instead)
for (int i = 0; i < rope.solverIndices.Length; ++i)
{
rope = GetComponent<ObiRope>();
smoother = GetComponent<ObiPathSmoother>();
rope.OnSimulationStart += Rope_OnBeginStep;
}
void OnDisable()
{
rope.OnSimulationStart -= Rope_OnBeginStep;
}
int solverIndex = rope.solverIndices[i];
private void Rope_OnBeginStep(ObiActor actor, float stepTime, float substepTime)
{
time += stepTime * pumpSpeed;
float distance = 0;
float sine = 0;
// iterate over all particles, changing their radius and color based on a sine wave:
// (note this would not support resizable / cuttable ropes, to add support for that use rope.elements instead)
for (int i = 0; i < rope.solverIndices.count; ++i)
if (i > 0)
{
int solverIndex = rope.solverIndices[i];
if (i > 0)
{
int previousIndex = rope.solverIndices[i - 1];
distance += Vector3.Distance(rope.solver.positions[solverIndex], rope.solver.positions[previousIndex]);
}
sine = Mathf.Max(0, Mathf.Sin(distance * bulgeFrequency - time));
rope.solver.principalRadii[solverIndex] = Vector3.one * Mathf.Lerp(baseThickness, bulgeThickness, sine);
rope.solver.colors[solverIndex] = Color.Lerp(Color.white, bulgeColor, sine);
int previousIndex = rope.solverIndices[i - 1];
distance += Vector3.Distance(rope.solver.positions[solverIndex],rope.solver.positions[previousIndex]);
}
// change particle emission rate/speed based on sine wave at the last particle:
if (waterEmitter != null)
{
var main = waterEmitter.main;
main.startSpeed = Mathf.Lerp(flowSpeedMin, flowSpeedMax, sine);
sine = Mathf.Max(0, Mathf.Sin(distance * bulgeFrequency - time));
var emission = waterEmitter.emission;
emission.rateOverTime = Mathf.Lerp(minEmitRate, maxEmitRate, sine);
}
rope.solver.principalRadii[solverIndex] = Vector3.one * Mathf.Lerp(baseThickness,bulgeThickness, sine);
rope.solver.colors[solverIndex] = Color.Lerp(Color.white, bulgeColor, sine);
}
public void LateUpdate()
// change particle emission rate/speed based on sine wave at the last particle:
if (waterEmitter != null)
{
if (smoother != null && waterEmitter != null)
{
ObiPathFrame section = smoother.GetSectionAt(1);
waterEmitter.transform.position = rope.solver.transform.TransformPoint(section.position);
waterEmitter.transform.rotation = rope.solver.transform.rotation * (Quaternion.LookRotation(section.tangent, section.binormal));
}
var main = waterEmitter.main;
main.startSpeed = Mathf.Lerp(flowSpeedMin,flowSpeedMax,sine);
var emission = waterEmitter.emission;
emission.rateOverTime = Mathf.Lerp(minEmitRate, maxEmitRate, sine);
}
}
}
public void LateUpdate()
{
if (smoother != null && waterEmitter != null)
{
ObiPathFrame section = smoother.GetSectionAt(1);
waterEmitter.transform.position = transform.TransformPoint(section.position);
waterEmitter.transform.rotation = transform.rotation * (Quaternion.LookRotation(section.tangent, section.binormal));
}
}
}

View File

@@ -1,50 +0,0 @@
using UnityEngine;
namespace Obi.Samples
{
public class PinholeRatchet : MonoBehaviour
{
public ObiPinhole pinhole;
public bool direction = false;
public float teethSeparation = 0.1f;
public float distanceToNextTooth { get; private set; }
void Update()
{
if (pinhole == null || pinhole.rope == null)
return;
float restLength = (pinhole.rope as ObiRopeBase).restLength;
float normalizedTeethDistance = Mathf.Max(0.001f, teethSeparation / restLength);
var range = pinhole.range;
if (direction)
{
distanceToNextTooth = (range.y - pinhole.position) * restLength;
while (distanceToNextTooth > teethSeparation)
{
range.y -= normalizedTeethDistance;
distanceToNextTooth -= teethSeparation;
}
}
else
{
distanceToNextTooth = (pinhole.position - range.x) * restLength;
while (distanceToNextTooth > teethSeparation)
{
range.x += normalizedTeethDistance;
distanceToNextTooth -= teethSeparation;
}
}
pinhole.range = range;
}
public void OnDisable()
{
if (pinhole != null)
pinhole.range = new Vector2(0, 1);
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: de82c5da5889a437bbca59463285c6a3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,23 +0,0 @@
using UnityEngine;
namespace Obi.Samples
{
public class RatchetController : MonoBehaviour
{
public PinholeRatchet ratchet;
public Transform ratchetVisualizer;
public float minAngle = 0;
public float maxAngle = 25;
void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
ratchet.enabled = !ratchet.enabled;
float angle = ratchet.enabled ? Mathf.LerpAngle(minAngle, maxAngle, ratchet.distanceToNextTooth / ratchet.teethSeparation) : maxAngle;
ratchetVisualizer.rotation = Quaternion.AngleAxis(angle, Vector3.forward);
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 89f7ec50c6e36440593469d980ba7830
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,25 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Obi.Samples
{
[RequireComponent(typeof(LineRenderer))]
public class RenderLineBetweenTransforms : MonoBehaviour
{
public Transform transformA;
public Transform transformB;
LineRenderer line;
void Awake()
{
line = GetComponent<LineRenderer>();
}
void Update()
{
if (transformA != null && transformB != null)
line.SetPositions(new Vector3[] { transformA.position, transformB.position });
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 411d9eba4bb0042bf9302873985bc6e0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,71 +1,63 @@
using UnityEngine;
using Obi;
namespace Obi.Samples
public class RopeBetweenTwoPoints : MonoBehaviour
{
public class RopeBetweenTwoPoints : MonoBehaviour
public Transform start;
public Transform end;
public ObiSolver solver;
void Start()
{
public Transform start;
public Transform end;
public ObiSolver solver;
// Generate rope synchronously:
Generate();
}
public bool fixedParticleCount = true;
public int numParticles = 5;
void Start()
void Generate()
{
if (start != null && end != null)
{
// Generate rope synchronously:
Generate();
}
// Adjust our transform:
transform.position = (start.position + end.position) / 2;
transform.rotation = Quaternion.FromToRotation(Vector3.right, end.position - start.position);
void Generate()
{
if (start != null && end != null)
{
// Adjust our transform:
transform.position = (start.position + end.position) / 2;
transform.rotation = Quaternion.FromToRotation(Vector3.right, end.position - start.position);
// Calculate control point positions and tangent vector:
Vector3 startPositionLS = transform.InverseTransformPoint(start.position);
Vector3 endPositionLS = transform.InverseTransformPoint(end.position);
Vector3 tangentLS = (endPositionLS - startPositionLS).normalized;
// Calculate control point positions and tangent vector:
Vector3 startPositionLS = transform.InverseTransformPoint(start.position);
Vector3 endPositionLS = transform.InverseTransformPoint(end.position);
Vector3 tangentLS = (endPositionLS - startPositionLS).normalized;
// Create the blueprint:
var blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
// Create the blueprint:
var blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
// Build the rope path:
int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 0);
blueprint.path.AddControlPoint(startPositionLS, -tangentLS, tangentLS, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "start");
blueprint.path.AddControlPoint(endPositionLS, -tangentLS, tangentLS, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "end");
blueprint.path.FlushEvents();
// Build the rope path:
int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 0);
blueprint.path.AddControlPoint(startPositionLS, -tangentLS, tangentLS, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "start");
blueprint.path.AddControlPoint(endPositionLS, -tangentLS, tangentLS, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "end");
blueprint.path.FlushEvents();
// Generate particles/constraints:
blueprint.GenerateImmediate();
if (fixedParticleCount)
blueprint.resolution = numParticles / (blueprint.path.Length / blueprint.thickness);
// Add rope actor / renderer / attachment components:
var rope = gameObject.AddComponent<ObiRope>();
var ropeRenderer = gameObject.AddComponent<ObiRopeExtrudedRenderer>();
var attachment1 = gameObject.AddComponent<ObiParticleAttachment>();
var attachment2 = gameObject.AddComponent<ObiParticleAttachment>();
// Generate particles/constraints:
blueprint.GenerateImmediate();
// Load the default rope section for rendering:
ropeRenderer.section = Resources.Load<ObiRopeSection>("DefaultRopeSection");
// Add rope actor / renderer / attachment components:
var rope = gameObject.AddComponent<ObiRope>();
var ropeRenderer = gameObject.AddComponent<ObiRopeExtrudedRenderer>();
var attachment1 = gameObject.AddComponent<ObiParticleAttachment>();
var attachment2 = gameObject.AddComponent<ObiParticleAttachment>();
// Set the blueprint:
rope.ropeBlueprint = blueprint;
// Load the default rope section for rendering:
ropeRenderer.section = Resources.Load<ObiRopeSection>("DefaultRopeSection");
// Attach both ends:
attachment1.target = start;
attachment2.target = end;
attachment1.particleGroup = blueprint.groups[0];
attachment2.particleGroup = blueprint.groups[1];
// Set the blueprint:
rope.ropeBlueprint = blueprint;
// Attach both ends:
attachment1.target = start;
attachment2.target = end;
attachment1.particleGroup = blueprint.groups[0];
attachment2.particleGroup = blueprint.groups[1];
// Parent the actor under a solver to start the simulation:
transform.SetParent(solver.transform);
}
// Parent the actor under a solver to start the simulation:
transform.SetParent(solver.transform);
}
}
}

View File

@@ -1,130 +1,129 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Obi;
namespace Obi.Samples
/**
* Sample component that procedurally generates a net using rigidbodies and ropes.
*/
public class RopeNet : MonoBehaviour
{
/**
* Sample component that procedurally generates a net using rigidbodies and ropes.
*/
public class RopeNet : MonoBehaviour
public Material material;
public Vector2Int resolution = new Vector2Int(5, 5);
public Vector2 size = new Vector2(0.5f, 0.5f);
public float nodeSize = 0.2f;
void Awake()
{
public Material material;
// create an object containing both the solver and the updater:
GameObject solverObject = new GameObject("solver", typeof(ObiSolver), typeof(ObiFixedUpdater));
ObiSolver solver = solverObject.GetComponent<ObiSolver>();
ObiFixedUpdater updater = solverObject.GetComponent<ObiFixedUpdater>();
updater.substeps = 2;
public Vector2Int resolution = new Vector2Int(5, 5);
public Vector2 size = new Vector2(0.5f, 0.5f);
public float nodeSize = 0.2f;
// adjust solver settings:
solver.particleCollisionConstraintParameters.enabled = false;
solver.distanceConstraintParameters.iterations = 8;
solver.pinConstraintParameters.iterations = 4;
solver.parameters.sleepThreshold = 0.001f;
solver.PushSolverParameters();
void Awake()
// add the solver to the updater:
updater.solvers.Add(solver);
// create the net (ropes + rigidbodies)
CreateNet(solver);
}
private void CreateNet(ObiSolver solver)
{
ObiCollider[,] nodes = new ObiCollider[resolution.x + 1, resolution.y + 1];
for (int x = 0; x <= resolution.x; ++x)
{
// create an object containing both the solver and the updater:
GameObject solverObject = new GameObject("solver", typeof(ObiSolver));
ObiSolver solver = solverObject.GetComponent<ObiSolver>();
solver.substeps = 2;
// adjust solver settings:
solver.particleCollisionConstraintParameters.enabled = false;
solver.distanceConstraintParameters.iterations = 8;
solver.pinConstraintParameters.iterations = 4;
solver.parameters.sleepThreshold = 0.001f;
solver.PushSolverParameters();
// create the net (ropes + rigidbodies)
CreateNet(solver);
}
private void CreateNet(ObiSolver solver)
{
ObiCollider[,] nodes = new ObiCollider[resolution.x + 1, resolution.y + 1];
for (int x = 0; x <= resolution.x; ++x)
for (int y = 0; y <= resolution.y; ++y)
{
for (int y = 0; y <= resolution.y; ++y)
{
GameObject rb = GameObject.CreatePrimitive(PrimitiveType.Cube);
rb.transform.position = new Vector3(x, y, 0) * size;
rb.transform.localScale = new Vector3(nodeSize, nodeSize, nodeSize);
GameObject rb = GameObject.CreatePrimitive(PrimitiveType.Cube);
rb.AddComponent<Rigidbody>();
rb.transform.position = new Vector3(x, y, 0) * size;
rb.transform.localScale = new Vector3(nodeSize, nodeSize, nodeSize);
rb.AddComponent<Rigidbody>();
nodes[x, y] = rb.AddComponent<ObiCollider>();
nodes[x, y].Filter = 1;
}
}
nodes[0, resolution.y].GetComponent<Rigidbody>().isKinematic = true;
nodes[resolution.x, resolution.y].GetComponent<Rigidbody>().isKinematic = true;
for (int x = 0; x <= resolution.x; ++x)
{
for (int y = 0; y <= resolution.y; ++y)
{
Vector3 pos = new Vector3(x, y, 0) * size;
if (x < resolution.x)
{
Vector3 offset = new Vector3(nodeSize * 0.5f, 0, 0);
var rope = CreateRope(pos + offset, pos + new Vector3(size.x, 0, 0) - offset);
rope.transform.parent = solver.transform;
PinRope(rope, nodes[x, y], nodes[x + 1, y]);
}
if (y < resolution.y)
{
Vector3 offset = new Vector3(0, nodeSize * 0.5f, 0);
var rope = CreateRope(pos + offset, pos + new Vector3(0, size.y, 0) - offset);
rope.transform.parent = solver.transform;
PinRope(rope, nodes[x, y], nodes[x, y + 1]);
}
}
nodes[x, y] = rb.AddComponent<ObiCollider>();
nodes[x, y].Filter = 1;
}
}
private void PinRope(ObiRope rope, ObiCollider bodyA, ObiCollider bodyB)
nodes[0, resolution.y].GetComponent<Rigidbody>().isKinematic = true;
nodes[resolution.x, resolution.y].GetComponent<Rigidbody>().isKinematic = true;
for (int x = 0; x <= resolution.x; ++x)
{
var A = rope.gameObject.AddComponent<ObiParticleAttachment>();
var B = rope.gameObject.AddComponent<ObiParticleAttachment>();
for (int y = 0; y <= resolution.y; ++y)
{
Vector3 pos = new Vector3(x, y, 0) * size;
if (x < resolution.x)
{
Vector3 offset = new Vector3(nodeSize * 0.5f, 0, 0);
var rope = CreateRope(pos + offset, pos + new Vector3(size.x, 0, 0) - offset);
rope.transform.parent = solver.transform;
A.attachmentType = ObiParticleAttachment.AttachmentType.Dynamic;
B.attachmentType = ObiParticleAttachment.AttachmentType.Dynamic;
PinRope(rope, nodes[x, y], nodes[x + 1, y], new Vector3(0.5f, 0, 0), -new Vector3(0.5f, 0, 0));
}
A.target = bodyA.transform;
B.target = bodyB.transform;
if (y < resolution.y)
{
Vector3 offset = new Vector3(0, nodeSize * 0.5f, 0);
var rope = CreateRope(pos + offset, pos + new Vector3(0, size.y, 0) - offset);
rope.transform.parent = solver.transform;
A.particleGroup = rope.ropeBlueprint.groups[0];
B.particleGroup = rope.ropeBlueprint.groups[1];
}
// Creates a rope between two points in world space:
private ObiRope CreateRope(Vector3 pointA, Vector3 pointB)
{
// Create a rope
var ropeObject = new GameObject("solver", typeof(ObiRope), typeof(ObiRopeLineRenderer));
var rope = ropeObject.GetComponent<ObiRope>();
var ropeRenderer = ropeObject.GetComponent<ObiRopeLineRenderer>();
rope.GetComponent<ObiRopeLineRenderer>().material = material;
rope.GetComponent<ObiPathSmoother>().decimation = 0.1f;
ropeRenderer.uvScale = new Vector2(1, 5);
// Setup a blueprint for the rope:
var blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
blueprint.resolution = 0.15f;
blueprint.thickness = 0.02f;
blueprint.pooledParticles = 0;
// convert both points to the rope's local space:
pointA = rope.transform.InverseTransformPoint(pointA);
pointB = rope.transform.InverseTransformPoint(pointB);
// Procedurally generate the rope path (a simple straight line):
Vector3 direction = (pointB - pointA) * 0.25f;
blueprint.path.Clear();
blueprint.path.AddControlPoint(pointA, -direction, direction, Vector3.up, 0.1f, 0.1f, 1, 1, Color.white, "A");
blueprint.path.AddControlPoint(pointB, -direction, direction, Vector3.up, 0.1f, 0.1f, 1, 1, Color.white, "B");
blueprint.path.FlushEvents();
rope.ropeBlueprint = blueprint;
return rope;
PinRope(rope, nodes[x, y], nodes[x, y + 1], new Vector3(0, 0.5f, 0), -new Vector3(0, 0.5f, 0));
}
}
}
}
private void PinRope(ObiRope rope, ObiCollider bodyA, ObiCollider bodyB, Vector3 offsetA, Vector3 offsetB)
{
// Pin both ends of the rope (this enables two-way interaction between character and rope):
var pinConstraints = rope.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints<ObiPinConstraintsBatch>;
pinConstraints.Clear();
var batch = new ObiPinConstraintsBatch();
batch.AddConstraint(rope.solverIndices[0], bodyA, offsetA, Quaternion.identity, 0, 999, float.PositiveInfinity);
batch.AddConstraint(rope.solverIndices[rope.activeParticleCount - 1], bodyB, offsetB, Quaternion.identity, 0, 999, float.PositiveInfinity);
batch.activeConstraintCount = 2;
pinConstraints.AddBatch(batch);
}
// Creates a rope between two points in world space:
private ObiRope CreateRope(Vector3 pointA, Vector3 pointB)
{
// Create a rope
var ropeObject = new GameObject("solver", typeof(ObiRope), typeof(ObiRopeLineRenderer));
var rope = ropeObject.GetComponent<ObiRope>();
var ropeRenderer = ropeObject.GetComponent<ObiRopeLineRenderer>();
rope.GetComponent<MeshRenderer>().material = material;
rope.GetComponent<ObiPathSmoother>().decimation = 0.1f;
ropeRenderer.uvScale = new Vector2(1, 5);
// Setup a blueprint for the rope:
var blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
blueprint.resolution = 0.15f;
blueprint.thickness = 0.02f;
blueprint.pooledParticles = 0;
// convert both points to the rope's local space:
pointA = rope.transform.InverseTransformPoint(pointA);
pointB = rope.transform.InverseTransformPoint(pointB);
// Procedurally generate the rope path (a simple straight line):
Vector3 direction = (pointB - pointA) * 0.25f;
blueprint.path.Clear();
blueprint.path.AddControlPoint(pointA, -direction, direction, Vector3.up, 0.1f, 0.1f, 1, 1, Color.white, "A");
blueprint.path.AddControlPoint(pointB, -direction, direction, Vector3.up, 0.1f, 0.1f, 1, 1, Color.white, "B");
blueprint.path.FlushEvents();
rope.ropeBlueprint = blueprint;
return rope;
}
}

View File

@@ -1,150 +1,127 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Obi;
namespace Obi.Samples
[RequireComponent(typeof(ObiRope))]
public class RopeSweepCut : MonoBehaviour
{
[RequireComponent(typeof(ObiRope))]
public class RopeSweepCut : MonoBehaviour
public Camera cam;
ObiRope rope;
LineRenderer lineRenderer;
Vector3 cutStartPosition;
private void Awake()
{
rope = GetComponent<ObiRope>();
public Camera cam;
AddMouseLine();
}
ObiRope rope;
LineRenderer lineRenderer;
Vector3 cutStartPosition;
Vector3 cutEndPosition;
bool cut;
private void OnDestroy()
{
DeleteMouseLine();
}
private void Awake()
private void AddMouseLine()
{
GameObject line = new GameObject("Mouse Line");
lineRenderer = line.AddComponent<LineRenderer>();
lineRenderer.startWidth = 0.005f;
lineRenderer.endWidth = 0.005f;
lineRenderer.numCapVertices = 2;
lineRenderer.sharedMaterial = new Material(Shader.Find("Unlit/Color"));
lineRenderer.sharedMaterial.color = Color.cyan;
lineRenderer.enabled = false;
}
private void DeleteMouseLine()
{
if (lineRenderer != null)
Destroy(lineRenderer.gameObject);
}
private void LateUpdate()
{
// do nothing if we don't have a camera to cut from.
if (cam == null) return;
// process user input and cut the rope if necessary.
ProcessInput();
}
/**
* Very simple mouse-based input. Not ideal for multitouch screens as it only supports one finger, though.
*/
private void ProcessInput()
{
// When the user clicks the mouse, start a line cut:
if (Input.GetMouseButtonDown(0))
{
rope = GetComponent<ObiRope>();
AddMouseLine();
cutStartPosition = Input.mousePosition;
lineRenderer.SetPosition(0, cam.ScreenToWorldPoint(new Vector3(cutStartPosition.x, cutStartPosition.y, 0.5f)));
lineRenderer.enabled = true;
}
private void OnDestroy()
{
DeleteMouseLine();
}
if (lineRenderer.enabled)
lineRenderer.SetPosition(1, cam.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0.5f)));
private void OnEnable()
// When the user lifts the mouse, proceed to cut.
if (Input.GetMouseButtonUp(0))
{
rope.OnSimulationStart += Rope_OnBeginSimulation;
}
private void OnDisable()
{
rope.OnSimulationStart -= Rope_OnBeginSimulation;
}
private void AddMouseLine()
{
GameObject line = new GameObject("Mouse Line");
lineRenderer = line.AddComponent<LineRenderer>();
lineRenderer.startWidth = 0.005f;
lineRenderer.endWidth = 0.005f;
lineRenderer.numCapVertices = 2;
lineRenderer.sharedMaterial = new Material(Shader.Find("Unlit/Color"));
lineRenderer.sharedMaterial.color = Color.cyan;
ScreenSpaceCut(cutStartPosition, Input.mousePosition);
lineRenderer.enabled = false;
}
private void DeleteMouseLine()
{
if (lineRenderer != null)
Destroy(lineRenderer.gameObject);
}
private void LateUpdate()
{
// do nothing if we don't have a camera to cut from.
if (cam == null) return;
// process user input and cut the rope if necessary.
ProcessInput();
}
private void Rope_OnBeginSimulation(ObiActor actor, float stepTime, float substepTime)
{
if (cut)
{
ScreenSpaceCut(cutStartPosition, cutEndPosition);
cut = false;
}
}
/**
* Very simple mouse-based input. Not ideal for multitouch screens as it only supports one finger, though.
*/
private void ProcessInput()
{
// When the user clicks the mouse, start a line cut:
if (Input.GetMouseButtonDown(0))
{
cutStartPosition = Input.mousePosition;
lineRenderer.SetPosition(0, cam.ScreenToWorldPoint(new Vector3(cutStartPosition.x, cutStartPosition.y, 0.5f)));
lineRenderer.enabled = true;
}
if (lineRenderer.enabled)
lineRenderer.SetPosition(1, cam.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0.5f)));
// When the user lifts the mouse, proceed to cut.
if (Input.GetMouseButtonUp(0))
{
cutEndPosition = Input.mousePosition;
lineRenderer.enabled = false;
cut = true;
}
}
/**
* Cuts the rope using a line segment, expressed in screen-space.
*/
private void ScreenSpaceCut(Vector2 lineStart, Vector2 lineEnd)
{
// keep track of whether the rope was cut or not.
bool ropeCut = false;
// iterate over all elements and test them for intersection with the line:
for (int i = 0; i < rope.elements.Count; ++i)
{
// project the both ends of the element to screen space.
Vector3 screenPos1 = cam.WorldToScreenPoint(rope.solver.positions[rope.elements[i].particle1]);
Vector3 screenPos2 = cam.WorldToScreenPoint(rope.solver.positions[rope.elements[i].particle2]);
// test if there's an intersection:
if (SegmentSegmentIntersection(screenPos1, screenPos2, lineStart, lineEnd, out float r, out float s))
{
ropeCut = true;
rope.Tear(rope.elements[i]);
}
}
// If the rope was cut at any point, rebuilt constraints:
if (ropeCut) rope.RebuildConstraintsFromElements();
}
/**
* line segment 1 is AB = A+r(B-A)
* line segment 2 is CD = C+s(D-C)
* if they intesect, then A+r(B-A) = C+s(D-C), solving for r and s gives the formula below.
* If both r and s are in the 0,1 range, it meant the segments intersect.
*/
private bool SegmentSegmentIntersection(Vector2 A, Vector2 B, Vector2 C, Vector2 D, out float r, out float s)
{
float denom = (B.x - A.x) * (D.y - C.y) - (B.y - A.y) * (D.x - C.x);
float rNum = (A.y - C.y) * (D.x - C.x) - (A.x - C.x) * (D.y - C.y);
float sNum = (A.y - C.y) * (B.x - A.x) - (A.x - C.x) * (B.y - A.y);
if (Mathf.Approximately(rNum, 0) || Mathf.Approximately(denom, 0))
{ r = -1; s = -1; return false; }
r = rNum / denom;
s = sNum / denom;
return (r >= 0 && r <= 1 && s >= 0 && s <= 1);
}
}
}
/**
* Cuts the rope using a line segment, expressed in screen-space.
*/
private void ScreenSpaceCut(Vector2 lineStart, Vector2 lineEnd)
{
// keep track of whether the rope was cut or not.
bool cut = false;
// iterate over all elements and test them for intersection with the line:
for (int i = 0; i < rope.elements.Count; ++i)
{
// project the both ends of the element to screen space.
Vector3 screenPos1 = cam.WorldToScreenPoint(rope.solver.positions[rope.elements[i].particle1]);
Vector3 screenPos2 = cam.WorldToScreenPoint(rope.solver.positions[rope.elements[i].particle2]);
// test if there's an intersection:
if (SegmentSegmentIntersection(screenPos1, screenPos2, lineStart, lineEnd, out float r, out float s))
{
cut = true;
rope.Tear(rope.elements[i]);
}
}
// If the rope was cut at any point, rebuilt constraints:
if (cut) rope.RebuildConstraintsFromElements();
}
/**
* line segment 1 is AB = A+r(B-A)
* line segment 2 is CD = C+s(D-C)
* if they intesect, then A+r(B-A) = C+s(D-C), solving for r and s gives the formula below.
* If both r and s are in the 0,1 range, it meant the segments intersect.
*/
private bool SegmentSegmentIntersection(Vector2 A, Vector2 B, Vector2 C, Vector2 D, out float r, out float s)
{
float denom = (B.x - A.x) * (D.y - C.y) - (B.y - A.y) * (D.x - C.x);
float rNum = (A.y - C.y) * (D.x - C.x) - (A.x - C.x) * (D.y - C.y);
float sNum = (A.y - C.y) * (B.x - A.x) - (A.x - C.x) * (B.y - A.y);
if (Mathf.Approximately(rNum, 0) || Mathf.Approximately(denom, 0))
{ r = -1; s = -1; return false; }
r = rNum / denom;
s = sNum / denom;
return (r >= 0 && r <=1 && s >= 0 && s <= 1);
}
}

View File

@@ -2,16 +2,13 @@
using System.Collections.Generic;
using UnityEngine;
namespace Obi.Samples
public class RopeTenser : MonoBehaviour
{
public class RopeTenser : MonoBehaviour
{
public float force = 10;
public float force = 10;
// Update is called once per frame
void Update()
{
GetComponent<Rigidbody>().AddForce(Vector3.down * force);
}
// Update is called once per frame
void Update()
{
GetComponent<Rigidbody>().AddForce(Vector3.down * force);
}
}

View File

@@ -1,60 +1,56 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Obi;
namespace Obi.Samples
[RequireComponent(typeof(ObiRope))]
[RequireComponent(typeof(MeshRenderer))]
public class RopeTensionColorizer : MonoBehaviour
{
[RequireComponent(typeof(ObiRope))]
public class RopeTensionColorizer : MonoBehaviour
public float minTension = 0;
public float maxTension = 0.2f;
public Color normalColor = Color.green;
public Color tensionColor = Color.red;
public RopeTenser tenser;
public float tenserThreshold = -5;
public float tenserMax = 0.1f;
private ObiRope rope;
private Material localMaterial;
void Awake()
{
public float minTension = 0;
public float maxTension = 0.2f;
public Color normalColor = Color.green;
public Color tensionColor = Color.red;
rope = GetComponent<ObiRope>();
localMaterial = GetComponent<MeshRenderer>().material;
}
public RopeTenser tenser;
public float tenserThreshold = -5;
public float tenserMax = 0.1f;
private void OnDestroy()
{
Destroy(localMaterial);
}
private ObiRope rope;
private Material localMaterial;
void Update()
{
if (tenser == null)
return;
void Awake()
// Calculate how much past the threshold the tenser is, clamp the excess to 1
float tenserFactor = Mathf.Min((tenser.transform.position.y - tenserThreshold) / tenserMax,1);
// Check if the tenser is above the threshold, if so then check rope tension:
if (tenserFactor > 0)
{
rope = GetComponent<ObiRope>();
var rend = GetComponent<ObiRopeLineRenderer>();
localMaterial = Instantiate(rend.material);
rend.material = localMaterial;
// Calculate current tension as ratio between current and rest length, then subtract 1 to center it at zero.
float tension = rope.CalculateLength() / rope.restLength - 1;
// Use tension to interpolate between colors:
float lerpFactor = (tension - minTension) / (maxTension - minTension);
localMaterial.color = Color.Lerp(normalColor, tensionColor, lerpFactor * tenserFactor);
}
private void OnDestroy()
else
{
Destroy(localMaterial);
}
void Update()
{
if (tenser == null)
return;
// Calculate how much past the threshold the tenser is, clamp the excess to 1
float tenserFactor = Mathf.Min((tenser.transform.position.y - tenserThreshold) / tenserMax, 1);
// Check if the tenser is above the threshold, if so then check rope tension:
if (tenserFactor > 0)
{
// Calculate current tension as ratio between current and rest length, then subtract 1 to center it at zero.
float tension = rope.CalculateLength() / rope.restLength - 1;
// Use tension to interpolate between colors:
float lerpFactor = (tension - minTension) / (maxTension - minTension);
localMaterial.color = Color.Lerp(normalColor, tensionColor, lerpFactor * tenserFactor);
}
else
{
localMaterial.color = normalColor;
}
localMaterial.color = normalColor;
}
}
}

View File

@@ -0,0 +1,118 @@
using System;
using System.Collections;
using UnityEngine;
using Obi;
public class RuntimeRopeGenerator
{
//private ObiRope rope;
//private ObiRopeCursor cursor;
private ObiSolver solver;
private int pinnedParticle = -1;
/// <summary>
/// Creates a straight rope anchored to a transform at the top.
/// Transform may or may not move around and may or may not have a rigidbody.
/// When you call this the rope will appear in the scene and immediately interact with gravity and objects with ObiColliders.
/// Called from anywhere (main thread only)
/// </summary>
public IEnumerator MakeRope(Transform anchoredTo, Vector3 attachmentOffset, float ropeLength)
{
// create a new GameObject with the required components: a solver, a rope, and a curve.
// we also throw a cursor in to be able to change its length.
/*GameObject ropeObject = new GameObject("rope",typeof(ObiSolver),
typeof(ObiRope),
typeof(ObiCurve),
typeof (ObiRopeCursor));
// get references to all components:
rope = ropeObject.GetComponent<ObiRope>();
cursor = ropeObject.GetComponent<ObiRopeCursor>();
solver = ropeObject.GetComponent<ObiSolver>();
ObiCurve path = ropeObject.GetComponent<ObiCurve>();
// set up component references (see ObiRopeHelper.cs)
rope.Solver = solver;
rope.ropePath = path;
//rope.section = Resources.Load<ObiRopeSection>("DefaultRopeSection");
// set path control points (duplicate end points, to set curvature as required by CatmullRom splines):
path.controlPoints.Clear();
path.controlPoints.Add(new ObiCurve.ControlPoint(Vector3.zero,Vector3.up));
path.controlPoints.Add(new ObiCurve.ControlPoint(Vector3.zero,Vector3.up));
path.controlPoints.Add(new ObiCurve.ControlPoint(Vector3.down*ropeLength,Vector3.up));
path.controlPoints.Add(new ObiCurve.ControlPoint(Vector3.down*ropeLength,Vector3.up));
rope.pooledParticles = 2000;
// parent the rope to the anchor transform:
rope.transform.SetParent(anchoredTo,false);
rope.transform.localPosition = attachmentOffset;
// generate particles/constraints and add them to the solver (see ObiRopeHelper.cs)
yield return rope.StartCoroutine(rope.GeneratePhysicRepresentationForMesh());
rope.AddToSolver(null);
// get the last particle in the rope at its rest state.
pinnedParticle = rope.UsedParticles-1;
// add a tethers batch:
ObiTetherConstraintBatch tetherBatch = new ObiTetherConstraintBatch(true,false,0,1);
rope.TetherConstraints.AddBatch(tetherBatch);
//UpdateTethers();
// fix first particle in place (see http://obi.virtualmethodstudio.com/tutorials/scriptingparticles.html)
rope.Solver.invMasses[rope.particleIndices[0]] = rope.invMasses[0] = 0;*/
yield return 0;
}
/// <summary>
/// MakeRope and AddPendulum may NOT be called on the same frame. You must wait for the MakeRope coroutine to finish first, as creating a rope is an asynchronous operation.
/// Just adds a pendulum to the rope on the un-anchored end.
/// </summary>
public void AddPendulum(ObiCollider pendulum, Vector3 attachmentOffset)
{
// simply add a new pin constraint (see http://obi.virtualmethodstudio.com/tutorials/scriptingconstraints.html)
/*rope.PinConstraints.RemoveFromSolver(null);
ObiPinConstraintBatch batch = (ObiPinConstraintBatch)rope.PinConstraints.GetFirstBatch();
batch.AddConstraint(pinnedParticle, pendulum, attachmentOffset,Quaternion.identity, 1);
rope.PinConstraints.AddToSolver(null);*/
}
/// <summary>
/// RemovePendulum and AddPendulum may be called on the same frame.
/// </summary>
public void RemovePendulum()
{
// simply remove all pin constraints (see http://obi.virtualmethodstudio.com/tutorials/scriptingconstraints.html)
/*rope.PinConstraints.RemoveFromSolver(null);
rope.PinConstraints.GetFirstBatch().Clear();
rope.PinConstraints.AddToSolver(null);*/
}
/// <summary>
/// Like extending or retracting a winch.
/// </summary>
public void ChangeRopeLength(float changeAmount)
{
// the cursor will automatically add/remove/modify constraints and particles as needed to obtain the new length.
//cursor.ChangeLength(rope.RestLength + changeAmount);
//UpdateTethers();
}
private void UpdateTethers()
{
/*rope.TetherConstraints.RemoveFromSolver(null);
ObiTetherConstraintBatch batch = (ObiTetherConstraintBatch)rope.TetherConstraints.GetFirstBatch();
batch.Clear();
ObiDistanceConstraintBatch dbatch = rope.DistanceConstraints.GetFirstBatch();
for (int i = 0; i < dbatch.ConstraintCount; ++i)
batch.AddConstraint(0,dbatch.springIndices[i*2+1], rope.InterparticleDistance*i, 1, 1);
batch.Cook();
rope.TetherConstraints.AddToSolver(null);*/
}
}

View File

@@ -1,5 +1,7 @@
fileFormatVersion: 2
guid: df6783efff96747d7b949f3538d1cee7
guid: 0854563331ce443fa9b17a143c084806
labels:
- ObiRope
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -0,0 +1,35 @@
using System;
using System.Collections;
using UnityEngine;
using Obi;
public class RuntimeRopeGeneratorUse : MonoBehaviour
{
public ObiCollider pendulum;
RuntimeRopeGenerator rg;
public IEnumerator Start()
{
rg = new RuntimeRopeGenerator();
// Create a rope:
yield return rg.MakeRope(transform,Vector3.zero,1);
// Add a pendulum (you should adjust the attachment point depending on your particular pendulum object)
rg.AddPendulum(pendulum,Vector3.up*0.5f);
}
public void Update(){
if (Input.GetKey(KeyCode.W)){
rg.ChangeRopeLength(- Time.deltaTime);
}
if (Input.GetKey(KeyCode.S)){
rg.ChangeRopeLength( Time.deltaTime);
}
}
}

View File

@@ -1,5 +1,7 @@
fileFormatVersion: 2
guid: 50979842bbc734acdb11f0f01062fe92
guid: 5e7b946ba720c495a8ee7c1d3e903063
labels:
- ObiRope
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,126 +1,122 @@
using UnityEngine;
using Obi;
namespace Obi.Samples
public class SnakeController : MonoBehaviour
{
public class SnakeController : MonoBehaviour
public Transform headReferenceFrame;
public float headSpeed = 20;
public float upSpeed = 40;
public float slitherSpeed = 10;
private ObiRope rope;
private ObiSolver solver;
private float[] traction;
private Vector3[] surfaceNormal;
private void Start()
{
public Transform headReferenceFrame;
public float headSpeed = 20;
public float upSpeed = 40;
public float slitherSpeed = 10;
rope = GetComponent<ObiRope>();
solver = rope.solver;
private ObiRope rope;
private ObiSolver solver;
private float[] traction;
private Vector3[] surfaceNormal;
// initialize traction array:
traction = new float[rope.activeParticleCount];
surfaceNormal = new Vector3[rope.activeParticleCount];
private void Start()
// subscribe to solver events (to update surface information)
solver.OnBeginStep += ResetSurfaceInfo;
solver.OnCollision += AnalyzeContacts;
solver.OnParticleCollision += AnalyzeContacts;
}
private void OnDestroy()
{
solver.OnBeginStep -= ResetSurfaceInfo;
solver.OnCollision -= AnalyzeContacts;
solver.OnParticleCollision -= AnalyzeContacts;
}
private void ResetSurfaceInfo(ObiSolver s, float stepTime)
{
// reset surface info:
for (int i = 0; i < traction.Length; ++i)
{
rope = GetComponent<ObiRope>();
solver = rope.solver;
// subscribe to solver events (to update surface information)
rope.OnSimulationStart += ResetSurfaceInfo;
solver.OnCollision += AnalyzeContacts;
solver.OnParticleCollision += AnalyzeContacts;
traction[i] = 0;
surfaceNormal[i] = Vector3.zero;
}
}
private void OnDestroy()
private void AnalyzeContacts(object sender, ObiSolver.ObiCollisionEventArgs e)
{
// iterate trough all contacts:
for (int i = 0; i < e.contacts.Count; ++i)
{
rope.OnSimulationStart -= ResetSurfaceInfo;
solver.OnCollision -= AnalyzeContacts;
solver.OnParticleCollision -= AnalyzeContacts;
}
private void ResetSurfaceInfo(ObiActor a, float simulatedTime, float substepTime)
{
if (traction == null)
var contact = e.contacts.Data[i];
if (contact.distance < 0.005f)
{
traction = new float[rope.activeParticleCount];
surfaceNormal = new Vector3[rope.activeParticleCount];
}
int simplexIndex = solver.simplices[contact.bodyA];
var particleInActor = solver.particleToActor[simplexIndex];
if (Input.GetKey(KeyCode.J))
{
for (int i = 1; i < rope.activeParticleCount; ++i)
if (particleInActor.actor == rope)
{
int solverIndex = rope.solverIndices[i];
int prevSolverIndex = rope.solverIndices[i - 1];
// using 1 here, could calculate a traction value based on the type of terrain, friction, etc.
traction[particleInActor.indexInActor] = 1;
// direction from current particle to previous one, projected on the contact surface:
Vector4 dir = Vector3.ProjectOnPlane(solver.positions[prevSolverIndex] - solver.positions[solverIndex], surfaceNormal[i]).normalized;
// move in that direction:
solver.velocities[solverIndex] += dir * traction[i] / solver.invMasses[solverIndex] * slitherSpeed * simulatedTime;
}
}
int headIndex = rope.solverIndices[0];
if (headReferenceFrame != null)
{
Vector3 direction = Vector3.zero;
// Determine movement direction:
if (Input.GetKey(KeyCode.W))
{
direction += headReferenceFrame.forward * headSpeed;
}
if (Input.GetKey(KeyCode.A))
{
direction += -headReferenceFrame.right * headSpeed;
}
if (Input.GetKey(KeyCode.S))
{
direction += -headReferenceFrame.forward * headSpeed;
}
if (Input.GetKey(KeyCode.D))
{
direction += headReferenceFrame.right * headSpeed;
}
// flatten out the direction so that it's parallel to the ground:
direction.y = 0;
solver.velocities[headIndex] += (Vector4)direction * simulatedTime;
}
if (Input.GetKey(KeyCode.Space))
solver.velocities[headIndex] += (Vector4)Vector3.up * simulatedTime * upSpeed;
// reset surface info:
for (int i = 0; i < traction.Length; ++i)
{
traction[i] = 0;
surfaceNormal[i] = Vector3.zero;
}
}
private void AnalyzeContacts(object sender, ObiNativeContactList e)
{
// iterate trough all contacts:
for (int i = 0; i < e.count; ++i)
{
var contact = e[i];
if (contact.distance < 0.005f)
{
int simplexIndex = solver.simplices[contact.bodyA];
var particleInActor = solver.particleToActor[simplexIndex];
if (particleInActor != null && particleInActor.actor == rope && traction != null)
{
// using 1 here, could calculate a traction value based on the type of terrain, friction, etc.
traction[particleInActor.indexInActor] = 1;
// accumulate surface normal:
surfaceNormal[particleInActor.indexInActor] += (Vector3)contact.normal;
}
// accumulate surface normal:
surfaceNormal[particleInActor.indexInActor] += (Vector3)contact.normal;
}
}
}
}
}
public void Update()
{
if (Input.GetKey(KeyCode.J))
{
for (int i = 1; i < rope.activeParticleCount; ++i)
{
int solverIndex = rope.solverIndices[i];
int prevSolverIndex = rope.solverIndices[i - 1];
// direction from current particle to previous one, projected on the contact surface:
Vector4 dir = Vector3.ProjectOnPlane(solver.positions[prevSolverIndex] - solver.positions[solverIndex], surfaceNormal[i]).normalized;
// move in that direction:
solver.velocities[solverIndex] += dir * traction[i] * slitherSpeed * Time.deltaTime;
}
}
int headIndex = rope.solverIndices[0];
if (headReferenceFrame != null)
{
Vector3 direction = Vector3.zero;
// Determine movement direction:
if (Input.GetKey(KeyCode.W))
{
direction += headReferenceFrame.forward * headSpeed;
}
if (Input.GetKey(KeyCode.A))
{
direction += -headReferenceFrame.right * headSpeed;
}
if (Input.GetKey(KeyCode.S))
{
direction += -headReferenceFrame.forward * headSpeed;
}
if (Input.GetKey(KeyCode.D))
{
direction += headReferenceFrame.right * headSpeed;
}
// flatten out the direction so that it's parallel to the ground:
direction.y = 0;
solver.velocities[headIndex] += (Vector4)direction * Time.deltaTime;
}
if (Input.GetKey(KeyCode.Space))
solver.velocities[headIndex] += (Vector4)Vector3.up * Time.deltaTime * upSpeed;
}
}

View File

@@ -1,53 +1,50 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Obi;
namespace Obi.Samples
{
[ExecuteInEditMode]
public class SpiralCurve : MonoBehaviour
[ExecuteInEditMode]
public class SpiralCurve : MonoBehaviour {
public float radius = 0.25f;
public float radialStep = 0.8f;
public float heightStep = 0.04f;
public float points = 30;
public float rotationalMass = 1;
public float thickness = 1;
void Awake ()
{
public float radius = 0.25f;
public float radialStep = 0.8f;
public float heightStep = 0.04f;
public float points = 30;
public float rotationalMass = 1;
public float thickness = 1;
void Awake()
{
Generate();
}
public void Generate()
{
var rod = GetComponent<ObiRopeBase>();
if (rod == null) return;
var blueprint = rod.sourceBlueprint as ObiRopeBlueprintBase;
if (blueprint == null) return;
blueprint.path.Clear();
float ang = 0;
float height = 0;
for (int i = 0; i < points; ++i)
{
Vector3 point = new Vector3(Mathf.Cos(ang) * radius, height, Mathf.Sin(ang) * radius);
// optimal handle length for circle approximation: 4/3 tan(pi/(2n))
Vector3 tangent = new Vector3(-point.z, heightStep, point.x).normalized * (4.0f / 3.0f) * Mathf.Tan(radialStep / 4.0f) * radius;
blueprint.path.AddControlPoint(point, -tangent, tangent, Vector3.up, 1, rotationalMass, thickness, 1, Color.white, "control point " + i);
ang += radialStep;
height += heightStep;
}
blueprint.path.FlushEvents();
}
Generate();
}
public void Generate()
{
var rod = GetComponent<ObiRopeBase>();
if (rod == null) return;
var blueprint = rod.sourceBlueprint as ObiRopeBlueprintBase;
if (blueprint == null) return;
blueprint.path.Clear();
float ang = 0;
float height = 0;
for (int i = 0; i < points; ++i)
{
Vector3 point = new Vector3(Mathf.Cos(ang) * radius, height, Mathf.Sin(ang) * radius);
// optimal handle length for circle approximation: 4/3 tan(pi/(2n))
Vector3 tangent = new Vector3(-point.z, heightStep, point.x).normalized * (4.0f / 3.0f) * Mathf.Tan(radialStep / 4.0f) * radius;
blueprint.path.AddControlPoint(point, -tangent, tangent, Vector3.up, 1, rotationalMass, thickness, 1, Color.white, "control point " + i);
ang += radialStep;
height += heightStep;
}
blueprint.path.FlushEvents();
}
}

View File

@@ -1,88 +0,0 @@
using System.Collections;
using UnityEngine;
namespace Obi.Samples
{
[RequireComponent(typeof(Rigidbody))]
public class TangledPeg : MonoBehaviour
{
public TangledPegSlot currentSlot;
public Collider floorCollider;
public ObiRope attachedRope;
[Header("Movement")]
public float stiffness = 200;
public float damping = 20;
public float maxAccel = 50;
public float minDistance = 0.05f;
public Rigidbody rb { get; private set; }
public ObiRigidbody orb { get; private set; }
void Awake()
{
rb = GetComponent<Rigidbody>();
orb = GetComponent<ObiRigidbody>();
// Ignore collisions with the floor:
Physics.IgnoreCollision(GetComponent<Collider>(), floorCollider);
// Initialize the peg's current slot, if any:
if (currentSlot != null)
{
currentSlot.currentPeg = this;
transform.position = currentSlot.transform.position;
}
}
public float MoveTowards(Vector3 position)
{
Vector3 vector = position - transform.position;
float distance = Vector3.Magnitude(vector);
// simple damped spring: F = -kx - vu
Vector3 accel = stiffness * vector - damping * rb.linearVelocity;
// clamp spring acceleration:
accel = Vector3.ClampMagnitude(accel, maxAccel);
rb.AddForce(accel, ForceMode.Acceleration);
return distance;
}
public void DockInSlot(TangledPegSlot slot)
{
StopAllCoroutines();
StartCoroutine(MoveTowardsSlot(slot));
}
public void UndockFromCurrentSlot()
{
if (currentSlot != null)
{
currentSlot.currentPeg = null;
rb.isKinematic = false;
}
}
private IEnumerator MoveTowardsSlot(TangledPegSlot slot)
{
float distance = float.MaxValue;
orb.kinematicForParticles = true;
while (distance > minDistance)
{
distance = MoveTowards(slot.transform.position);
yield return 0;
}
currentSlot = slot;
currentSlot.currentPeg = this;
transform.position = currentSlot.transform.position;
rb.isKinematic = true;
orb.kinematicForParticles = false;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: beb10e70cc06a4b019ecf88348a5f7fa
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,34 +0,0 @@
using UnityEngine;
namespace Obi.Samples
{
public class TangledPegSlot : MonoBehaviour
{
public TangledPeg currentPeg;
public Color tintColor;
private Material instance;
private Color normalColor;
public void Awake()
{
instance = GetComponent<Renderer>().material;
normalColor = instance.color;
}
public void Tint()
{
instance.color = tintColor;
}
public void ResetColor()
{
instance.color = normalColor;
}
public void OnDestroy()
{
Destroy(instance);
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 866212c246a9c4c5797069099ad745aa
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,138 +0,0 @@
using UnityEngine;
using UnityEngine.Events;
namespace Obi.Samples
{
[RequireComponent(typeof(ObiSolver))]
public class TangledRopesGameController : MonoBehaviour
{
public TangledPegSlot[] pegSlots;
public float pegHoverHeight = 1;
public float maxPegDistanceFromSlot = 1.5f;
public int framesWithoutContactsToWin = 30;
public UnityEvent onFinish = new UnityEvent();
private TangledPeg selectedPeg;
private Plane floor = new Plane(Vector3.up, 0);
private int framesSinceLastContact = 0;
void OnEnable()
{
GetComponent<ObiSolver>().OnParticleCollision += Solver_OnParticleCollision;
}
private void OnDisable()
{
GetComponent<ObiSolver>().OnParticleCollision -= Solver_OnParticleCollision;
}
private TangledPegSlot FindCandidateSlot(TangledPeg peg)
{
// Go over all slots, find the closest one to the peg that's closer than
// maxPegDistanceFromSlot:
TangledPegSlot closest = null;
float closestDistance = float.MaxValue;
foreach (TangledPegSlot slot in pegSlots)
{
// reset slot color, to make sure it looks normal if it's not a candidate for our peg.
slot.ResetColor();
// ignore occupied slots:
if (slot.currentPeg != null)
continue;
Vector3 slotOnFloor = floor.ClosestPointOnPlane(slot.transform.position);
Vector3 pegOnFloor = floor.ClosestPointOnPlane(peg.transform.position);
float distance = Vector3.Distance(slotOnFloor, pegOnFloor);
if (distance < closestDistance && distance < maxPegDistanceFromSlot)
{
closest = slot;
closestDistance = distance;
}
}
return closest;
}
private void Update()
{
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
// User clicks, cast a ray towards the floor, see if it hits any peg.
if (Input.GetMouseButtonDown(0))
{
if (Physics.Raycast(ray, out RaycastHit hit))
{
// if the ray hit a peg, store it as the selected peg and lift it off from its current slot.
if (hit.transform.TryGetComponent(out TangledPeg peg) && peg.currentSlot != null)
{
selectedPeg = peg;
selectedPeg.UndockFromCurrentSlot();
}
}
}
if (selectedPeg != null)
{
// Make selected peg follow the mouse cursor:
if (floor.Raycast(ray, out float enter))
selectedPeg.MoveTowards(ray.GetPoint(enter) + Vector3.up * pegHoverHeight);
// Try to find a suitable slot to drop the peg:
TangledPegSlot closest = FindCandidateSlot(selectedPeg);
// If we found a candidate slot, tint it to give the player some visual feedback:
if (closest != null)
closest.Tint();
// Drop selected peg:
if (Input.GetMouseButtonUp(0))
{
// If we could find a free slot nearby, connect to it:
if (closest != null)
{
selectedPeg.currentSlot = null;
selectedPeg.DockInSlot(closest);
closest.ResetColor();
}
else // If we couldn't find one or if it's too far, return to current slot.
{
selectedPeg.DockInSlot(selectedPeg.currentSlot);
}
selectedPeg = null;
}
}
// If all ropes have been contact-free for a certain amount of frames, trigger finish event.
if (framesSinceLastContact >= framesWithoutContactsToWin && onFinish != null)
onFinish.Invoke();
}
private void Solver_OnParticleCollision(ObiSolver s, ObiNativeContactList e)
{
// Count contacts between different ropes (that is, exclude self-contacts):
int contactsBetweenRopes = 0;
for (int i = 0; i < e.count; ++i)
{
var ropeA = s.particleToActor[s.simplices[e[i].bodyA]].actor;
var ropeB = s.particleToActor[s.simplices[e[i].bodyB]].actor;
if (ropeA != ropeB)
contactsBetweenRopes++;
}
// If there's no contacts, bump the amount of frames we've been contact-free.
// Otherwise reset the amount of frames to zero.
if (contactsBetweenRopes == 0)
framesSinceLastContact++;
else
framesSinceLastContact = 0;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: c1cdc16773c1f4ebe94e32c3ae0005bf
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,114 +0,0 @@
using UnityEngine;
namespace Obi.Samples
{
public class VineClimbController : MonoBehaviour
{
public ObiSolver solver;
public float climbSpeed = 1.5f;
ObiPinhole pinhole;
bool pressedSpace = false;
void Start()
{
solver.OnCollision += Solver_OnCollision;
}
public void Update()
{
if (pinhole != null)
{
float speed = 0;
if (Input.GetKey(KeyCode.W))
speed = climbSpeed;
if (Input.GetKey(KeyCode.S))
speed = -climbSpeed;
pinhole.motorSpeed = speed;
}
if (Input.GetKeyDown(KeyCode.Space))
{
pressedSpace = true;
DetachFromVine();
}
}
private void Solver_OnCollision(ObiSolver solver, ObiNativeContactList contacts)
{
if (pressedSpace)
{
int bestParticle = -1;
float closestDistance = float.MaxValue;
Vector3 closestOffset = Vector3.zero;
foreach (var c in contacts)
{
if (c.distance < 0.001f)
{
ObiCollider collider = ObiColliderWorld.GetInstance().colliderHandles[c.bodyB].owner as ObiCollider;
if (collider.sourceCollider.isTrigger)
{
int particle = solver.simplices[c.bodyA];
var worldPosition = solver.transform.TransformPoint(solver.positions[particle]);
Vector3 offset = worldPosition - collider.transform.position;
float distance = Vector3.Magnitude(offset);
if (distance < closestDistance)
{
closestDistance = distance;
closestOffset = offset;
bestParticle = particle;
}
}
}
}
if (bestParticle >= 0)
{
var actor = solver.particleToActor[bestParticle].actor;
AttachToVine(actor as ObiRope, bestParticle, closestOffset);
}
pressedSpace = false;
}
}
private float GetParticleMu(ObiRope rope, int solverParticleIndex)
{
for (int i = 0; i < rope.elements.Count; ++i)
{
if (rope.elements[i].particle1 == solverParticleIndex)
return i / (float)rope.elements.Count;
if (rope.elements[i].particle2 == solverParticleIndex)
return (i + 1) / (float)rope.elements.Count;
}
return 1;
}
// Update is called once per frame
void AttachToVine(ObiRope rope, int particle, Vector3 offset)
{
if (pinhole == null && rope != null)
{
transform.position += offset;
pinhole = rope.gameObject.AddComponent<ObiPinhole>();
pinhole.position = GetParticleMu(rope, particle);
pinhole.motorForce = Mathf.Infinity;
pinhole.friction = 1;
pinhole.target = this.transform;
}
}
void DetachFromVine()
{
if (pinhole != null)
{
GameObject.Destroy(pinhole);
pinhole = null;
pressedSpace = false;
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 50c674b3f8f0045249ac099130c6a6b2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -2,73 +2,71 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using Obi;
namespace Obi.Samples
[RequireComponent(typeof(ObiSolver))]
public class WrapRopeGameController : MonoBehaviour
{
[RequireComponent(typeof(ObiSolver))]
public class WrapRopeGameController : MonoBehaviour
{
ObiSolver solver;
ObiSolver solver;
public Wrappable[] wrappables;
public UnityEvent onFinish = new UnityEvent();
public Wrappable[] wrappables;
public UnityEvent onFinish = new UnityEvent();
private void Awake()
{
solver = GetComponent<ObiSolver>();
}
private void Awake()
{
solver = GetComponent<ObiSolver>();
}
// Start is called before the first frame update
void OnEnable()
{
solver.OnCollision += Solver_OnCollision;
}
// Start is called before the first frame update
void OnEnable()
{
solver.OnCollision += Solver_OnCollision;
}
private void OnDisable()
{
solver.OnCollision -= Solver_OnCollision;
}
private void OnDisable()
{
solver.OnCollision -= Solver_OnCollision;
}
private void Update()
{
bool allWrapped = true;
private void Update()
{
bool allWrapped = true;
// Test our win condition: all pegs must be wrapped.
foreach (var wrappable in wrappables)
{
if (!wrappable.IsWrapped())
{
allWrapped = false;
break;
}
}
// Test our win condition: all pegs must be wrapped.
foreach (var wrappable in wrappables)
{
if (!wrappable.IsWrapped())
{
allWrapped = false;
break;
}
}
if (allWrapped)
onFinish.Invoke();
}
if (allWrapped)
onFinish.Invoke();
}
private void Solver_OnCollision(ObiSolver s, ObiNativeContactList e)
{
// reset to unwrapped state:
foreach (var wrappable in wrappables)
wrappable.Reset();
private void Solver_OnCollision(ObiSolver s, ObiSolver.ObiCollisionEventArgs e)
{
// reset to unwrapped state:
foreach (var wrappable in wrappables)
wrappable.Reset();
var world = ObiColliderWorld.GetInstance();
foreach (Oni.Contact contact in e)
{
// look for actual contacts only:
if (contact.distance < 0.025f)
{
var col = world.colliderHandles[contact.bodyB].owner;
if (col != null)
{
var wrappable = col.GetComponent<Wrappable>();
if (wrappable != null)
wrappable.SetWrapped();
}
}
}
}
}
}
var world = ObiColliderWorld.GetInstance();
foreach (Oni.Contact contact in e.contacts)
{
// look for actual contacts only:
if (contact.distance < 0.025f)
{
var col = world.colliderHandles[contact.bodyB].owner;
if (col != null)
{
var wrappable = col.GetComponent<Wrappable>();
if (wrappable != null)
wrappable.SetWrapped();
}
}
}
}
}

View File

@@ -2,44 +2,41 @@
using System.Collections.Generic;
using UnityEngine;
namespace Obi.Samples
[RequireComponent(typeof(Rigidbody))]
public class WrapRopePlayerController : MonoBehaviour
{
[RequireComponent(typeof(Rigidbody))]
public class WrapRopePlayerController : MonoBehaviour
public float acceleration = 50;
Rigidbody rb;
void Awake()
{
public float acceleration = 50;
Rigidbody rb;
void Awake()
{
rb = GetComponent<Rigidbody>();
}
// Update is called once per frame
void Update()
{
Vector3 direction = Vector3.zero;
// Determine movement direction:
if (Input.GetKey(KeyCode.W))
{
direction += Vector3.up * acceleration;
}
if (Input.GetKey(KeyCode.A))
{
direction += Vector3.left * acceleration;
}
if (Input.GetKey(KeyCode.S))
{
direction += Vector3.down * acceleration;
}
if (Input.GetKey(KeyCode.D))
{
direction += Vector3.right * acceleration;
}
rb.AddForce(direction.normalized * acceleration, ForceMode.Acceleration);
}
rb = GetComponent<Rigidbody>();
}
// Update is called once per frame
void Update()
{
Vector3 direction = Vector3.zero;
// Determine movement direction:
if (Input.GetKey(KeyCode.W))
{
direction += Vector3.up * acceleration;
}
if (Input.GetKey(KeyCode.A))
{
direction += Vector3.left * acceleration;
}
if (Input.GetKey(KeyCode.S))
{
direction += Vector3.down * acceleration;
}
if (Input.GetKey(KeyCode.D))
{
direction += Vector3.right * acceleration;
}
rb.AddForce(direction.normalized * acceleration, ForceMode.Acceleration);
}
}

View File

@@ -2,43 +2,40 @@
using System.Collections.Generic;
using UnityEngine;
namespace Obi.Samples
public class Wrappable : MonoBehaviour
{
public class Wrappable : MonoBehaviour
{
private bool wrapped = false;
public Color normalColor = new Color(0.2f, 0.2f, 0.8f);
public Color wrappedColor = new Color(0.9f, 0.9f, 0.2f);
private bool wrapped = false;
public Color normalColor = new Color(0.2f,0.2f,0.8f);
public Color wrappedColor = new Color(0.9f, 0.9f, 0.2f);
Material localMaterial;
Material localMaterial;
public void Awake()
{
localMaterial = GetComponent<MeshRenderer>().material;
}
public void Awake()
{
localMaterial = GetComponent<MeshRenderer>().material;
}
public void OnDestroy()
{
Destroy(localMaterial);
}
public void OnDestroy()
{
Destroy(localMaterial);
}
public void Reset()
{
wrapped = false;
localMaterial.color = normalColor;
}
public void Reset()
{
wrapped = false;
localMaterial.color = normalColor;
}
public void SetWrapped()
{
wrapped = true;
localMaterial.color = wrappedColor;
}
public void SetWrapped()
{
wrapped = true;
localMaterial.color = wrappedColor;
}
public bool IsWrapped()
{
return wrapped;
}
public bool IsWrapped()
{
return wrapped;
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 KiB

View File

@@ -1,98 +0,0 @@
fileFormatVersion: 2
guid: 9c47de74aec0642928f43bb91a7346b7
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

View File

@@ -1,98 +0,0 @@
fileFormatVersion: 2
guid: e4a9139c969c3419a813c9513127f817
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 1
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant: