# How can I make sure the rotation has finished or the transform is facing the target?

void FixedUpdate()
{
LiftProcess();
MoveProcess();
TiltProcess();

if (hasRotate == true)
{
Vector3 targetDirection = helicopterPlatform.transform.position - transform.position;
Vector3 newDirection = Vector3.RotateTowards(transform.forward, targetDirection, lookAtSpeed * Time.deltaTime, 0.0f);
transform.rotation = Quaternion.LookRotation(newDirection);
}
}


I want ot make a check IF transform.rotation has finished and the transform is facing the newDirection then change the flag hasRotate to false. What check and how should I apply ?

You can check if ( Vector3.Angle(newDirection, targetDirection) < thresholdDegrees), where you can set the threshold in degrees as tight as you like.