Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. private Vector3 firstPosition;
  2. private Vector3 finalPosition;
  3. private float swipeAngle;
  4.  
  5. //......//
  6.  
  7. void OnMouseDown(){
  8. //Mendapatkan titik awal sentuhan jari
  9. firstPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
  10. }
  11.  
  12. void OnMouseUp(){
  13. //Mendapatkan titik akhir sentuhan jari
  14. finalPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement