Hey @fbcoyote!
Here’s how to set up your objective from scratch:
-
Create a new actor for our borders and add a box collision component to it.
-
Place our border actor into the level 2 times, one at the left border and one at the right border.
-
While having the left one selected, navigate to the Details window at the bottom left (below the Outliner window and next to the World Settings window), type in “tag” into the search bar, and under Actor > Advanced > Tags, create a new tag and name it “Left” like this:
Also do the same for the right one but name it’s tag “Right”.
- Head to the project settings, type in “channel” into the search bar, and under Trace Channels, create a new channel and name it “Border” like this:
If it’s default response is set to Block, there’s no need to adjust our border actor’s collision settings as it would already block our new trace channel. But that would require you to adjust the collision settings of all the other obstacles in your level, setting them to ignore the new trace channel. On the other hand, if you set it’s default response to Ignore, you’d only need to adjust our border actor’s collision settings to make it block the new trace channel.
- Finally, inside the Event Graph of your player pawn (or character), implement this blueprint code:
And here’s the result:
Hope this helps!