public void SpawnRope() { Vector3 nextRopeSectionPosition = transform.position; nextRopeSectionPosition -= transform.right * transform.localScale.x; _nextRopeSection = (GrapplingRopeSection)Instantiate(_grapplingRopeSectionPrefab, nextRopeSectionPosition, transform.rotation); _nextRopeSection.joint.connectedBody = _rigidbody; _nextRopeSection.controller = controller; }
public void Start() { _firstRope = (GrapplingRopeSection)Instantiate(_grapplingRopeSectionPrefab, transform.position, transform.rotation); _firstRope.joint.connectedBody = _rigidbody; _firstRope.controller = controller; }