- Home /
Question by
notseriousgames4life · Oct 24, 2021 at 03:53 PM ·
ainavmeshnavmeshagent
My NavMeshAgent doesn't move at all!,Why my NavMeshAgent doesn't move at all?
I baked my NavMesh and attached all the Components to the Agent, but it doesn't move! Help! ,I baked my NavMesh, I attached script and all components to my agent, but it doesn't move! Help!
void Start()
{
agent = GetComponent<NavMeshAgent>();
house = GameObject.FindGameObjectWithTag("house").transform;
agent.speed = 10f;
}
void Update()
{
if (Vector3.Distance(transform.position, house.position) >= 1f)
{
Debug.Log("Enemy " + transform.name + " far from house.");
agent.SetDestination(house.position);
}
}
снимок-экрана-2021-10-22-205233.png
(92.5 kB)
sdgfdsg.png
(34.7 kB)
Comment
Your answer
Follow this Question
Related Questions
Checking if a non-walkable layer is blocking the path? (NavMeshAgent) 0 Answers
NavMeshAgent resume original position and facing direction C# 0 Answers
Player's last location as a Transform 1 Answer
Access navmeshagent calculation data? 0 Answers
Nav Mesh Agent makes object disappear!!! Help!!,Nav Mesh Agent makes object disappear!! Help 2 Answers