How to stop a VInterp on collision?

I’m currently attempting to have a cube object move only on the Y axis, left and right in a small corridor. I’d like for this cube to be an obstacle for the player. Currently, I have the Cube BP setup to VInterp on the Y axis. How do I stop the VInterp once it collides with the wall? Once I have that figured out, I think I can determine how to reverse it and have it go in the other direction.

The boolean ‘Sweep’ in Set Actor Relative Location stops the object from moving when collision is detected.

Actually this code is correct! The issue was that my cube was colliding with the floor which didn’t allow it to move!

So how did you change the collision settings?
Did you set the floor to “NoCollision”?

Edit: Just noticed this post is 8 years old, I’ll probably look for an answer elsewhere :rofl: