if (value < 1f)
{
value += speed * Time.deltaTIme; // value is class field of float type
box.transform.position = Vector3.Lerp (BoxStart, BoxDestination, value);
}
I think you should make 2 phase for that, first for move the box to the drop position and then move the box down to the final destination.
Current case will move the box to the final position (box will move through the ground).
In the end I use IEnumerator for dropping the box and disable the TEMP_COL. Here’s the IEnumberator code for dropping the box once the box collides with TEMP_COL:
First it disables the temporary collider, allowing the player to go through/over the dropped box. As for the dropping I use the same deltaTime code but have it in an IEnumerator which solves the issue where the box drop smoothly instead of snapping straight into position.