绳
This commit is contained in:
@@ -790,7 +790,7 @@ Transform:
|
||||
m_GameObject: {fileID: 963194225}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -5}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
@@ -979,16 +979,16 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
startAttachment: {fileID: 1670765576}
|
||||
endAttachment: {fileID: 1778778649}
|
||||
nodeDistance: 0.05
|
||||
nodeDistance: 30
|
||||
nodeColliderRadius: 0.3
|
||||
gravityStrength: 1.962
|
||||
totalLength: 30
|
||||
velocityDampen: 0.95
|
||||
stiffness: 0.99
|
||||
iterateCollisionsEvery: 1
|
||||
iterations: 10
|
||||
iterateCollisionsEvery: 10
|
||||
iterations: 20
|
||||
colliderBufferSize: 1
|
||||
ropeWidth: 0.02
|
||||
ropeWidth: 0.01
|
||||
--- !u!4 &1418847131
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1340,7 +1340,7 @@ Transform:
|
||||
m_GameObject: {fileID: 1670765571}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -1.38, y: 0, z: 0}
|
||||
m_LocalPosition: {x: -1.38, y: 1.45, z: 0}
|
||||
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
||||
@@ -16,8 +16,8 @@ public class Rope : MonoBehaviour
|
||||
[SerializeField] float totalLength = 10f;
|
||||
[SerializeField, Range(0, 1)] float velocityDampen = 0.95f;
|
||||
[SerializeField, Range(0, 0.99f)] float stiffness = 0.8f;
|
||||
[SerializeField, Range(1, 10)] int iterateCollisionsEvery = 1;
|
||||
[SerializeField, Range(1, 200)] int iterations = 10;
|
||||
[SerializeField] int iterateCollisionsEvery = 1;
|
||||
[SerializeField] int iterations = 10;
|
||||
[SerializeField] int colliderBufferSize = 1;
|
||||
|
||||
[Header("Line Renderer")] [SerializeField]
|
||||
@@ -204,7 +204,7 @@ public class Rope : MonoBehaviour
|
||||
nodeColliderRadius,
|
||||
colliderHitBuffer,
|
||||
~(1 << 8));
|
||||
|
||||
|
||||
for (int n = 0; n < hits; n++)
|
||||
{
|
||||
if (Physics.ComputePenetration(
|
||||
|
||||
Reference in New Issue
Block a user