Can you show us the code for your Player input that is fed into your Event Interact Move? (so I can reproduce a test)
I think you need to add a bool /collision check for each Cardinal direction. Meaning if Player presses W (move platform +Y), but it hits something - then disable movement only for +Y, but still allow Player to press D (move platform +X).
And have this collision check on a Tick, so it keeps updating: did we hit something? Yes, so stop input in that direction. But a second later, are we still hitting something? No, so allow that movement-direction again.
And I think you should setup movement-direction points, like this vid, but setup Cardinal direction points like my image.
So in his vid, you set Point 0 at the Center of your mesh.
- Set the point North of your mesh (from top view = +Y axis) as Point 1.
- Set the East (right) point as Point 2. Then add the rest, going clockwise.
** PS set these points internally in your BP, by using Arrows. Move them to 1000 units away from Point 0. Then in your code, drag in each Arrow component > Get location/vector.
So if player presses W, your code gets Point 1 as:
[Get current location of Point 0, which is inside the BP of your Platform mesh] + add [X = 0, Y = 10000]
(because we only want to change the Y axis location, so put X change as 0, and Y change as very far away from Point 0)
= new destination point to move to. (And it keeps moving in that direction until Player changes Input, or hits something.)
Then in your Event for On Component Begin overlap (we hit something):
Now set Point 1 (north point) = Point 0. This means we cannot move North anymore because delta: [Point 0 to 1] is no change on the Y axis.
But we can still move on the X axis (if we press D or A).
-
So have the collision code check which direction you were moving, and have 4 branches for each direction. If it was North, have code on that Branch > disable more North movement by setting that Point 1 to the same Vector of Point 0 (center of the object).
-
If we hit something going East (Point 2), set Point 2 as [the object’s current Point 0], so no more East movement.
-
Then have your Tick update/refresh Point 1 and 2 back to far away from Point 0 - to perform the check again.
Edit: also I believe your movement node is wrong. Use Set Actor location, not offset.