Crate rl_ball_sym

source ·
Expand description

rl_ball_sym is a Rust implementation of a simulation of the Rocket League ball inside it’s field. It loads the real geometry from the game and simulates the ball’s movement in nanoseconds.

§Example: ultra_basic

use rl_ball_sym::{load_standard, Predictions, Vec3A};

// load a standard standard match
let (game, mut ball) = load_standard();

// the current state of the ball in the game
ball.update(0., Vec3A::new(0., 0., 200.), Vec3A::new(0., 0., -0.1), Vec3A::new(0., 0., 0.));

// generate the ball prediction struct
// this is a list of 720 slices
// it goes 6 seconds into the future with 120 slices per second
let ball_prediction: Predictions = ball.get_ball_prediction_struct(&game);
assert_eq!(ball_prediction.len(), 720);

// ball is not modified, it stays the same!
assert_eq!(ball.time, 0.);

Re-exports§

  • pub extern crate glam;

Structs§

  • Represents the game’s ball
  • All of the game information.
  • A 3-dimensional vector.

Functions§

  • Returns a Game object with a standard dropshot field and dropshot ball.
  • Returns a Game object with a standard hoops field and hoops ball.
  • Returns a Game object with a standard standard field and standard ball.
  • Returns a Game object with throwback stadium and a standard ball.

Type Aliases§

  • Collection of Balls representing future predictions based on field geometry