in gym-compete/gym_compete/new_envs/kick_and_defend.py [0:0]
def is_goal(self):
ball_xyz = self.get_ball_qpos()[:3]
if self.GOAL_X > 0 and ball_xyz[0] > self.GOAL_X and abs(ball_xyz[1]) <= self.GOAL_Y:
return True
elif self.GOAL_X < 0 and ball_xyz[0] < self.GOAL_X and abs(ball_xyz[1]) <= self.GOAL_Y:
return True
return False