-
Notifications
You must be signed in to change notification settings - Fork 21
Ball Path Prediction
Tyler edited this page Sep 3, 2018
·
1 revision
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
// 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);
}