I am making a rts game and im trying to get the building to go up as far as the builder has built it so im trying to get it to translate to the other object bye a percent but i dont know how to do that.
heres a basic version of the script.
private float amountToBuild = 30;
private float amountBuilt = 0; // it adds to this as it builds
public GameObject building;
public GameObject StopPose;
void Update()
{
building.transform.position = Vector3.MoveTowards(transform.position, stopPose.transform.position, ); // how do i make it only go as far as its built
}