sim3d.scenario.ActorBehavior Class
Namespace: sim3d.scenario
Superclasses: matlab.System
Description
sim3d.scenario.ActorBehavior
is the base class to define the behavior
of RoadRunner actors in an Unreal Engine® 3D Viewer scenario simulation. Associating a subclass of
ActorBehavior
to a RoadRunner actor allows you to view your RoadRunner scenario simulation in Unreal Engine 3D Viewer. For example, to create an actor behavior named
My3DActor
, use this code in the first line of your class definition
file.
classdef My3DActor < sim3d.scenario.ActorBehavior
In your subclass, customize the onSimulationStart
,
onSimulationStep
, and onSimulationStop
methods to define
the simulation behavior of your actor.
To define the behavior of a RoadRunner actor that uses Unreal Engine 3D viewer:
Create a subclass of
sim3d.scenario.ActorBehavior
.Customize the
onSimulationStart
,onSimulationStep
, andonSimulationStop
methods.Create a new behavior in the RoadRunner Asset Library that uses your subclass file.
Associate the new behavior with one or more actors in your scenario.
Connect MATLAB® and RoadRunner and start simulation.
This workflow builds on the one described in Simulate RoadRunner Scenarios with Actors Modeled in MATLAB. For an example of
ActorBehavior
objects, see Simulate RoadRunner Scenarios with Actors Modeled in MATLAB and View in Unreal Engine 3D Viewer.
The sim3d.scenario.ActorBehavior
class is a handle
class.
Class Attributes
Abstract | true |
HandleCompatible | true |
For information on class attributes, see Class Attributes.
Properties
Methods
Examples
Version History
Introduced in R2023b