Moving Collider Independant Of GameObject

I’m working on something that I haven’t experimented with before. Might be an easy answer, might not be…

A little background - my game is grid-based so objects move around a square at a time.

I have a GameObject. That GameObject has a Box Collider around it.

When the object makes the decision to move forward, I want to send its collider forward first to “occupy” its intended grid square and prevent another object from trying to take it at the same time. Then, I’ll move the object itself forward (with its animation etc) and move the collider BACK at the same time, so they merge back into one.

My question: is it possible to move an object’s collider in this way? As in, independantly of the object itself. Tried a couple of experiments and nothing seems to do it.

Failing that, is there another obvious way to deal with this type of grid square contention?

Okay, as is often the case, as soon as I finally post it, I finally solve it.

One line of code added to the object’s movement cycle:

while (t <= 1.0f)
{
    t += Time.deltaTime * (moveSpeed / Movement.instance.gridSize);
    transform.position = Vector3.Lerp(startPosition, endPosition, t);
    thisBoxCollider.center = Vector3.Lerp(new Vector3(0.0f, 5.0f, Movement.instance.gridSize), new Vector3(0.0f, 5.0f, 0.0f), t);
    yield return null;
}

There are surely better ways, but this is ONE way if anyone else comes looking for an answer.