void OnTriggerEnter(Collider other) { if(other.tag == "Player") { // change the move direction playerControllerRef = other.gameObject.GetComponentInParent<PlayerController>(); if (_type == TriggerType.startDrift) { bool tDir = false; if (_turnDirection == TurnDirection.left) { tDir = false; } else if (_turnDirection == TurnDirection.right) { tDir = true; } else Debug.Log("No Turn Direction Set."); playerControllerRef.SetCorner(_cornerMagnitude, tDir); //change the end trigger's turn magnitude to cancel the right amount of turn when you hit it if (_endTrigger != null) _endTrigger.GetComponent<TriggerScript>()._cornerMagnitude = _cornerMagnitude; } else if (_type == TriggerType.endDrfit) { playerControllerRef.EndCorner(_cornerMagnitude, _nextTrigger.transform.position); } else if (_type == TriggerType.launch) { playerControllerRef.SetLaunch(_launchForceMagnitude, _launchAngle); } } //turn the character to it's side a bit //start the drifting animation }