Skip to content

Ball Path Prediction

Tyler edited this page Sep 3, 2018 · 1 revision

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

// Get the ball prediction data.
BallPrediction prediction = GetBallPrediction();

// Loop through every 10th point so we don't render too many lines.
for (int i = 10; i < prediction.SlicesLength; i += 10)
{
    Vector3 pointA = prediction.Slices(i - 10).Value.Physics.Value.Location.Value;
    Vector3 pointB = prediction.Slices(i).Value.Physics.Value.Location.Value;

    Renderer.DrawLine3D(Color.FromRgb(255, 0, 255), pointA, pointB);
}
Clone this wiki locally