line修改
This commit is contained in:
@@ -14,13 +14,13 @@ namespace NBF
|
||||
Tail
|
||||
}
|
||||
|
||||
private FLine _solver;
|
||||
[SerializeField] private FLine _solver;
|
||||
|
||||
[Header("Node")] [SerializeField] private NodeType nodeType = NodeType.Tail;
|
||||
[SerializeField] public Rigidbody body;
|
||||
[SerializeField] private Rope _rope;
|
||||
public Rope Rope;
|
||||
[SerializeField] private MonoBehaviour interaction;
|
||||
private ConfigurableJoint _joint;
|
||||
[SerializeField] private ConfigurableJoint _joint;
|
||||
|
||||
[Header("Segment To Next Logical Node")] [Min(0f)] [SerializeField]
|
||||
private float segmentLengthToNext = 0.5f;
|
||||
@@ -63,8 +63,8 @@ namespace NBF
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_solver = GetComponentInParent<FLine>();
|
||||
_joint = GetComponent<ConfigurableJoint>();
|
||||
if (!_solver) _solver = GetComponentInParent<FLine>();
|
||||
if (!_joint) _joint = GetComponent<ConfigurableJoint>();
|
||||
EnsureFeatureCache();
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace NBF
|
||||
if (!Mathf.Approximately(lenght, _joint.linearLimit.limit))
|
||||
{
|
||||
_joint.linearLimit = new SoftJointLimit() { limit = lenght };
|
||||
_rope.SetTargetLength(lenght - 0.1f);
|
||||
Rope.SetTargetLength(lenght - 0.1f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user