ChangeSpeedAction
Description
The ChangeSpeedAction object represents a Change
Speed action in the RoadRunner scenario logic. The Change Speed action specifies for the
actor to change speed using the specified properties. Specifying
ChangeSpeedAction as the action type when adding an action to your
scenario adds a Change Speed action to the specified phase in the scenario
logic. You can use the ChangeSpeedAction object to programmatically modify
the attributes of the corresponding Change Speed action by changing the
property values of the object.
Creation
By default, RoadRunner Scenario automatically adds a Change Speed action to the initial phase
of an actor when you place the actor in your scenario. You can use the initialPhaseForActor
function to extract the object for the initial phase of the actor. Then, extract the
ChangeSpeedAction object from the first element of the
Actions property of the initial phase.
You can also use the addAction function to add
an action of the specified type as a child to the specified phase. Specify the
actionType argument as "ChangeSpeedAction" to create a
ChangeSpeedAction object associated with the specified phase.
Properties
Examples
Version History
Introduced in R2025a
See Also
addAction | ChangeLaneAction | ChangeLateralOffsetAction | ChangeLongitudinalDistanceAction | WaitAction
Topics
- Define Scenario Logic (RoadRunner Scenario)