void Start() { _animator = GetComponent <Animator>(); _model = this.gameObject; _locomotionScript = GetComponent <LocomotionController>(); _feetController = new FeetController(_animator); _leftFeetController = new FeetController(_animator); _predictor = new FeetPredictor(_animator); _characterController = GetComponent <CharacterController>(); _prevRightPos = rightFootT.transform.position; }
void Awake() { ovrCameraController = GetComponentInChildren<OVRCameraController>(); ovrCameraControllerTransform = ovrCameraController.transform; headController = GetComponent<HeadController>(); handsController = GetComponent<HandsController>(); feetController = GetComponent<FeetController>(); motionController = GetComponent<MotionController>(); swooshSound = ovrCameraControllerTransform.Find("SwooshSound").GetComponent<AudioSource>(); materialTriggers = GameObject.FindObjectsOfType( typeof (TriggerSolidColor ) ) as TriggerSolidColor[]; foreach ( CameraAnchor cameraAnchor in GameObject.FindObjectsOfType( typeof(CameraAnchor) )) characterCameraAnchorTransforms.Add( cameraAnchor.transform ); }