Ball and BallState

The Ball class is fairly intuitive, and contains both the physics data and BallState of the ball. There is only one Ball instance in each Arena.

class Ball

Public Functions

BallState GetState()
void SetState(const BallState &state)
Ball(const Ball &other) = delete

No copy/move constructor.

Ball(Ball &&other) = delete
inline float GetRadiusBullet()
inline float GetRadius()
~Ball()
struct BallState

Public Functions

void Serialize(DataStreamOut &out)
void Deserialize(DataStreamIn &in)

Public Members

Vec pos = {0, 0, RLConst::BALL_REST_Z}

Position in world space.

Vec vel = {0, 0, 0}

Linear velocity.

Vec angVel = {0, 0, 0}

Angular velocity (axis-angle)

BallHitInfo ballHitInfo = BallHitInfo()

Information from the most recent car-ball hit Does ever not reset automatically.