soo i have 2 cubes and i want to make animation by using Vector3.Lerp so the cube 1 will go Lerp to cube 2 and if both in same place set touched var to true. so i typed this :
IEnumerator PlayAnimation()
{
while(//cube 1.position != cube 2.position//)
{
//lerp Cube1 to cube 2
yield return new waitforseconds(0.01f);
}
//then here i want to check if they are in the same place and if soo then set the touched varible to true
if(//cube 1.position += cube 2.position//)
{
touched = true;
yield break;
}
}
but the if statement doesnt work …