track cube position and update accordingly