Hi there,
I am using a NavMeshAgent and NavMesh to move my player about. UI is such, I tap screen and convert screen pos to world pos, However, this works only for one z direction. My naveMeshAgent, agent, only moves in one Z direction. If I tap up, where I would expect him to move away from the camera, he does. But if I tap down, where I would expect him to move toward the camera, he does not.
Any ideas??
Thanks
void setMoveToPos(Vector2 moveToPos){
////moveToPos = screen tap pos
///-18.6 z distance of camera to 0
Vector3 worldPos = Cam_Main.ScreenToWorldPoint(new Vector3(moveToPos.x, moveToPos.y, -18.6f));
targetPoint = new Vector3(-worldPos.x, worldPos.y, agent.transform.position.z);
moveActive = true;
}