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_soccar, BallPrediction, Vec3A};

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

// 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: BallPrediction = 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;
pub use crate::simulation::ball::Ball;
pub use crate::simulation::ball::BallPrediction;
pub use crate::simulation::game::Game;

Modules

Tools for compressing the binary field data at compile time and lazy-static decompressing it at runtime.
A collection of all the tools required to simulate the Rocket League ball inside it’s field.

Structs

A 3-dimensional vector with SIMD support.

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 soccar field and soccar ball.
Returns a Game object with throwback stadium and a standard soccar ball.
Returns a Game object with a standard soccer field and soccer ball.
Returns a Game object with throwback stadium and a standard soccer ball.