Changing speed of motion path on same obejct
I need to simulate the speed of light slowing down as it moves from a vacuum through an object and back out into the vacuum. In the attachment, the pink line represents light. I set a motion path to the object (blue rectangle) but now I need the same pink line to slow down as it moves through the rectangle, then speed back up again as it exits back into the vacuum. The way it was originally set up was with two additional pink lines with their own motion paths but that look was choppy and didn't work for the client. I have no idea if this can even be done. Can anyone help?