If statement on a Vector faulty

  Ray ray;
  RaycastHit hit;
   void Update () {
      ray = Camera.main.ScreenPointToRay(Input.mousePosition);
      if(Physics.Raycast(ray, out hit)) {
       var n = hit.transform.name;
       if( n == transform.name && Input.GetMouseButtonDown(0)) {
  
         Vector3 incomingVec = hit.normal - Vector3.up;

         if (incomingVec == new Vector3(0, -1, -1))print("ts");
         
         print(incomingVec);

       }

   }

This if statement wont work. Why not? That incomingVec is (0.0, -1.0, -1.0)

because 0.0, -1.0, -1.0 is not 0, -1, -1
You can see the difference?
You cannot compare float values using == because of float precision.
You could use

See if the distance between them is less than a very small value

Use Mathf.Approximately()

Yup. == doesn’t work on floats very well. And Vector3 is basically three floats together. Thus it doesn’t work consistently.