Crate rl_ball_sym

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§

Ball
Represents the game’s ball
Game
All of the game information.
Vec3A
A 3-dimensional vector.

Functions§

dropshot_field
Returns a Game object with a standard dropshot field.
hoops_field
Returns a Game object with a standard hoops field and hoops ball.
load_dropshot
Returns a Game object with a standard dropshot field and dropshot ball.
load_hoops
Returns a Game object with a standard hoops field and hoops ball.
load_standard
Returns a Game object with a standard field and standard ball.
load_standard_heatseeker
Returns a Game object with a standard field and heatseeker ball.
load_standard_throwback
Returns a Game object with throwback stadium and a standard ball.
standard_field
Returns a Game object with a standard standard field and standard ball.
throwback_stadium
Returns a Game object with throwback stadium.

Type Aliases§

Predictions
Collection of Balls representing future predictions based on field geometry