How to create set boundaries for a pawn?

I have a box component that I want to act as a boundary for where the pawn can move on the screen. I want to achieve something similar to the Pixel Ship example where the ship can only move so far left or right. Looking through the Blueprints of the Pixel Ship game controller I don’t see any logic that would stop pawn movement when it gets to the edge of the screen. How can this be done?

Hello,

A quick fix for this would be to add Blocking Volumes to keep your character inside a specific space (take a look at Shooter Game, there’s Blocking Volumes used to prevent players from jumping out of the level).

-W

I really want to stay away from Blocking Volumes. I’d have to go in and make blocking volumes for each level. Isn’t there a way to block the Pawn with a box shape component? That would be much easier for me. I have a box shape component, but no matter what settings I try my Pawn always floats right through. I tried setting the Pawn and the Box Shape to Block All and it still didn’t work.

You might be able to set min/max values for the X, Y or Z depending upon what you want to limit your character to.

I took a look at the example you mention in the Content Examples, that example is using the Doorframe static mesh to keep the character in the play space (that’s why you couldn’t see anything in the Blueprint for restricting movement).

-W

Yeah I just set min/max values. Thanks for the suggestion.