Hey, I’m trying to make a basic hockey style game.
I have the basic physics working with the pitch, a player, an opponent, and a ball.
I’m struggling to figure out how I can allow the ball to travel into the goal
while keeping the player and opponent from going into the goal.
Basically the opponent follows the ball, and the player is controlled by user input.
so there are two restrictions I need.
I need to create a shape that only the ball can go through… is this even possible?
Maybe I can sleep the opponent if the ball passes the goal line?
Am I going about it the right way?
Player1 can only move around in the red box
Player2 can only move around in the green box
The ball can move around in the outer blue box

If you’re using Box2D, you probably want to look into Sensors.
Taken from the Box2D Manual: