merge projects and arrange script folders

This commit is contained in:
voffka81
2022-08-17 11:14:32 +03:00
parent beea2145cb
commit c0ea0addcb
35 changed files with 608 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
public class CharacterMovement : MonoBehaviour
{
public NavMeshAgent playerNavMeshAgent;
public Camera playerCamera;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if(Input.GetMouseButton(0))
{
Ray myRay=playerCamera.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
if(Physics.Raycast(myRay, out hit))
{
playerNavMeshAgent.SetDestination(hit.point);
}
}
}
}