void Start() { curve = FindObjectOfType <HelixCurve>(); gameState = FindObjectOfType <GameState>(); RenderHelix(); // Apply the parent's rotation and stuff to the children. transform.localRotation = rotation; transform.localPosition = position; }
// Start is called before the first frame update void Start() { player = GetComponent <Player>(); if (isEnemy) { curSide = side.B; } if (curSide == side.B) { offset = Mathf.PI; } curve = GameObject.FindObjectOfType <HelixCurve>(); Vector3 curvePos = curve.Ft(tState, offset); this.transform.position = curvePos; //Debug.Log(this.transform.position); //Debug.Log(curvePos); }