State setting can be used to alter the ball and cars on the field. This is very usefull for creating custom training scenarios.
rlbot::Interface::SetGameState(GameState state);
Sets the ball and cars to the values contained in state.
state
rlbot::GameState gamestate = rlbot::GameState(); gamestate.ballState.physicsState.location = {0, 0, 1000}; gamestate.ballState.physicsState.velocity = {0, 0, 5000}; rlbot::CarState carstate = rlbot::CarState(); carstate.physicsState.location = {0, 500, 1000}; carstate.physicsState.velocity = {500, 1000, 1000}; carstate.physicsState.angularVelocity = {1, 2, 3}; carstate.boostAmount = 50; gamestate.carStates[0] = carstate; rlbot::Interface::SetGameState(gamestate);
There was an error while loading. Please reload this page.