I am making a top down rail shooter and I have a player pawn set to move along a spline.
The player pawn has a box collision and a child actor.
I have a input axis for both moving the child actor forward, Backward, Left, and right. Relatively.
I dont want the child actor to be able to move outside of this box collision
(The box collision is a component of the player pawn)
Here is the blueprints for moving the child actor relatively.
Although it’s possible to keep the child inside the box with code, why not just make four boxes outside the current one and set them to ‘block all’? That way, the child can move freely with normal code until it hits one of the edges…
I did think about that but I will have enemies all around that the player has to use the child actor to kill (Similar to the game Blackhawk Striker) but if all of the boxes are block all I don’t want it to interfere with any of the enemies.