Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void LateUpdate() {
- planeObject.GetComponent<Animation>().enabled = true;
- debugText.text = (false).ToString();
- if (!planeObject.GetComponent<Animation>().IsPlaying("walk_blocking"))
- {
- bool played = planeObject.GetComponent<Animation>().Play("walk_blocking");
- debugText.text = (true).ToString();
- }
- debugText3.text = camera.transform.position.ToString();
- //debugText.text = playerFollow.GetComponent<PlayerFollow>().targetDistance.ToString();
- debugText2.text = planeObject.transform.position.ToString();
- if (SystemInfo.supportsGyroscope)
- {
- Vector3 gravityVector = Input.gyro.gravity;
- bool warunek = ((gravityVector.y <= BOTTOM_LOOK_ANGLE) && (gravityVector.y >= -BOTTOM_LOOK_ANGLE));
- if(warunek)
- {
- //debugText2.text = "Started finding";
- if(!objectPlaced)
- {
- planeDetector.SetActive(true);
- }
- } else
- {
- if (!objectPlaced)
- debugText2.text = "Stopped finding";
- planeDetector.SetActive(false);
- }
- } else
- {
- debugText.text = "No gyro ;/";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement