Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Update()
- {
- if (Input.GetMouseButtonDown(1))
- {
- Ray rayMove = Camera.main.ScreenPointToRay(Input.mousePosition);
- if (Physics.Raycast(rayMove, out hitInfoMove, Mathf.Infinity, groundLayer))
- {
- playerAgent.destination = hitInfoMove.point;
- anim.SetBool("isMoving", true);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement