Skip to content

Ball Path Prediction

Tyler edited this page Sep 3, 2018 · 8 revisions

About

This feature gives you the predicted ball path. For more details, see the main wiki at https://github.com/RLBot/RLBot/wiki/Ball-Path-Prediction

Example

ball_prediction = self.get_ball_prediction()

if ball_prediction is not None:
    for i in range(0, ball_prediction.SlicesLength()):
        prediction_slice = ball_prediction.Slices(i)
        location = prediction_slice.Physics().Location()
        self.logger.info("At time {}, the ball will be at ({}, {}, {})"
                         .format(prediction_slice.GameSeconds(), location.X(), location.Y(), location.Z()))

Clone this wiki locally