Files
LowPolyRPG/Assets/Plugins/RaycastPro/_Demo/_Scripts/SimpleMove.cs

21 lines
450 B
C#
Raw Normal View History

2025-06-25 11:10:11 +01:00
using RaycastPro.RaySensors;
using UnityEngine;
using UnityEngine.AI;
namespace Plugins.RaycastPro.Demo.Scripts
{
public class SimpleMove : MonoBehaviour
{
public RaySensor raySensor;
public NavMeshAgent agent;
void Update()
{
// Left Click mouse
if (Input.GetMouseButtonDown(0))
{
agent.destination = raySensor.HitPoint;
}
}
}
}