Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. void LateUpdate() {
  2. planeObject.GetComponent<Animation>().enabled = true;
  3.  
  4. debugText.text = (false).ToString();
  5. if (!planeObject.GetComponent<Animation>().IsPlaying("walk_blocking"))
  6. {
  7. bool played = planeObject.GetComponent<Animation>().Play("walk_blocking");
  8. debugText.text = (true).ToString();
  9. }
  10. debugText3.text = camera.transform.position.ToString();
  11. //debugText.text = playerFollow.GetComponent<PlayerFollow>().targetDistance.ToString();
  12.  
  13.  
  14. debugText2.text = planeObject.transform.position.ToString();
  15. if (SystemInfo.supportsGyroscope)
  16. {
  17. Vector3 gravityVector = Input.gyro.gravity;
  18. bool warunek = ((gravityVector.y <= BOTTOM_LOOK_ANGLE) && (gravityVector.y >= -BOTTOM_LOOK_ANGLE));
  19.  
  20. if(warunek)
  21. {
  22. //debugText2.text = "Started finding";
  23. if(!objectPlaced)
  24. {
  25. planeDetector.SetActive(true);
  26. }
  27. } else
  28. {
  29. if (!objectPlaced)
  30. debugText2.text = "Stopped finding";
  31. planeDetector.SetActive(false);
  32. }
  33. } else
  34. {
  35. debugText.text = "No gyro ;/";
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement