from rlbot.agents.base_agent import SimpleControllerState controller_state = SimpleControllerState(throttle=1, boost=False) # Move forward at max speed for 2 seconds for i in range(120): # Send controller inputs to the game self.set_controller_state(controller_state) # Wait for one game tick (1/60th of a second) self.wait(1/60) # Brake by setting throttle to -1 controller_state.throttle = -1 # Wait for 1 second self.wait(60) # Stop the car by setting all other inputs to 0 controller_state.throttle = 0 controller_state.steer = 0 controller_state.pitch = 0 controller_state.yaw = 0 controller_state.roll = 0 self.set_controller_state(controller_state)
from rlbot.agents.base_agent import SimpleControllerState controller_state = SimpleControllerState(throttle=-0.5, steer=1) # Set yaw to 1 to prevent the car from spinning controller_state.yaw = 1 self.set_controller_state(controller_state)Package library: `rlbot`