This documentation is for a prerelease version of O3DE. Click here to switch to the latest release, or select a version from the dropdown.

Version:

MotionEvent Public Member Functions

The MotionEvent class includes the following public member functions.

Topics

MotionEvent

You can use the MotionEvent function to trigger an event at a specific point in time (a tick event) or during a specified time range (a range event). To specify the data that the event emits, you can use pointers or datasets.

Syntax

MotionEvent (float timeValue, EventDataPtr &&data)

Creates a tick event and uses a data pointer.


ParameterDescription
timeValueThe time value, in seconds, when the motion event should occur.
dataThe values to emit when the event is triggered.

Syntax

MotionEvent (float startTimeValue, float endTimeValue, EventDataPtr &&data)

Creates a ranged event and uses a data pointer.


ParameterDescription
startTimeValueThe start time value, in seconds, when the motion event should start.
endTimeValueThe end time value, in seconds, when the motion event should end. When equal to the start time value, a start event is triggered, but no end event occurs.
dataThe values to emit when the event is triggered.

Syntax

MotionEvent (float timeValue, EventDataSet &&datas)

Creates a tick event and uses a dataset.


ParameterDescription
timeValueThe time value, in seconds, when the motion event should occur.
datasThe values to emit when the event is triggered.

Syntax

MotionEvent (float startTimeValue, float endTimeValue, EventDataSet &&datas)

Creates a ranged event and uses a dataset.


ParameterDescription
startTimeValueThe start time value, in seconds, when the motion event should start.
endTimeValueThe end time value, in seconds, when the motion event should end. When equal to the start time value, a start event is triggered, but no end event occurs.
datasThe values to emit when the event is triggered.

SetStartTime

Sets the start time value of the event, which is when the event should be processed.

Syntax

void SetStartTime (float timeValue)

SetEndTime

Sets the end time value of the event, which is when the event should be processed.

Syntax

void SetEndTime (float timeValue)

GetStartTime

Gets the start time value of this event, which is when the event should be executed.

Syntax

float GetStartTime () const

GetEndTime

Gets the end time value of this event, which is when the event should stop.

Syntax

float GetEndTime () const

GetIsTickEvent

Checks whether this is a tick event.

Syntax

bool GetIsTickEvent () const

ConvertToTickEvent

Converts this event into a tick event.

Syntax

void ConvertToTickEvent ()

GetIsSyncEvent

Checks whether this event is a sync event.

Syntax

bool GetIsSyncEvent () const

SetIsSyncEvent

Specifies whether this event is a sync event.

Syntax

void SetIsSyncEvent (bool newValue)

HashForSyncing

Creates a hash on the sync track of a motion.

Syntax

size_t HashForSyncing (bool isMirror) const