-
Notifications
You must be signed in to change notification settings - Fork 9
State setting
kipje13 edited this page Aug 22, 2019
·
2 revisions
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
.
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);