Advertisement
Guest User

Untitled

a guest
Jun 12th, 2020
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. void Update()
  2. {
  3. if (Input.GetMouseButtonDown(1))
  4. {
  5. Ray rayMove = Camera.main.ScreenPointToRay(Input.mousePosition);
  6.  
  7.  
  8. if (Physics.Raycast(rayMove, out hitInfoMove, Mathf.Infinity, groundLayer))
  9. {
  10. playerAgent.destination = hitInfoMove.point;
  11. anim.SetBool("isMoving", true);
  12. }
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement