This is the specific part of the movement in the script,
function movenow(){
yield WaitForSeconds(DelayTime);
transform.position = Vector3.Lerp(position1.transform.position, position2.transform.position, moveTime);
yield WaitForSeconds(pausetime);
transform.position = Vector3.Lerp(position2.transform.position, position1.transform.position, moveTime);
hasnowmoved = false;
ison = false;
}
movetime is set to 1, so I expected the object to move from position1 to p[osition2 in one second, but does it instantly. I'm not sure if I have codedit wrong, or if it's missing something, any help would be appreciated.
↧