Restrict movement within the volume

as far as movement is perfect. I think the gif must be the collision or I don’t know