It would be helpful if you would post your parts and assembly.
Go to the advanced mates & use the "Width" mate. Pick two faces from one part & two from the other & set to "Free" (the default I think will be centered). This will allow movement of the inner part untill it hits either of the two inner faces of the bigger part.
Yes, it was a new feature added in SW2015..there are two other options as well but can't remember off the top of my head what they are.
It may be easier to use a path mate in this case, but it does depend on how you want the cube to react once you edited the slot and changed the sizes. As you are able to do this by creating an assembly sketch as a path and a sketch point within the cube as the component vertex.
If you want to move the inner block, but also have limited side to side movement, here is what I would do
1. Make a sketch like Olly showed
2. Mate the center block parallel to the side
3. Mate the block sketch center point to part two line
4. Add a limit distance mate between the center block and part two end wall
5. Do the same for both sides
6. Edit the distant values and add an equation based on the clearance you need, or make the limited distance dimension a global dimension
I'm looking for this functionality too.
Path mate can work but if the bottom cube surface isn't always the same mating distance away from the channel's surface, then it's difficult to use one point in the cube to mate to the path.
Putting a simple distance between the cube's wall and the channel's wall on both sides of the cube, and letting the cube move anywhere within that boundary would be so much easier. Is that functionality here yet in SW2015, 2016 or 2017?