I’ve set my agent vacation spot utilizing this line:
selectedGameObject.GetComponent<NavMeshAgent>().vacation spot = rightClickHit.level - new Vector3(2, 0, 2);
Then, I am checking to see when the agent reaches the vacation spot by this line:
if (selectedGameObject.rework.place == rightClickHit.level - new Vector3(2, selectedGameObject.rework.place.y, 2))
I’ve debugged it and know the agent does attain the vacation spot with the offset
However the situation by no means resolves to true. Is it presumably off by decimal locations past 2? The agent does seem to cease shifting when it reaches the goal offset.
Go simple on me. It is solely my second week of coding.
Tim