SpawnHapticsPlayerComponent
(
ActorToAttachTo
, HapticClip
, Controller
, Priority
, Amplitude
, FrequencyShift
, bIsLooping
)
|
Spawns a UMetaXRHapticsPlayerComponent and attaches it to an Actor.
Always spawn new player components using this method. It is a known issue that Unreal's built-in "Add Haptics SDK Player" will lead to initialization errors.
When playback finishes, the component will not automatically destroy itself.
Signature
static UMetaXRHapticsPlayerComponent * UMetaXRHapticsFunctionLibrary::SpawnHapticsPlayerComponent(AActor *ActorToAttachTo, UMetaXRHapticClip *HapticClip, const EMetaXRHapticController Controller, const int32 Priority=512, const float Amplitude=1.0f, const float FrequencyShift=0.0f, const bool bIsLooping=false) Parameters ActorToAttachTo: AActor *
Actor to which this component will be attached.
Priority: const int32
Playback priority, ranging from 0 (low priority) to 1024 (high priority).
Amplitude: const float
Amplitude scale, ranging from 0.0 to infinity.
FrequencyShift: const float
Frequency shift, ranging from -1.0 to 1.0.
bIsLooping: const bool
Whether playback should loop.
Returns UMetaXRHapticsPlayerComponent *
A UMetaXRHapticsPlayerComponent that plays back the haptic clip and can be used to control playback.
|