APlayerController::PlayDynamicForceFeedback

Allows playing of a dynamic force feedback event from native code Begins playing when Start is called.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/PlayerController.h

Include

#include "GameFramework/PlayerController.h"

Source

/Engine/Source/Runtime/Engine/Private/PlayerController.cpp

Syntax

FDynamicForceFeedbackHandle PlayDynamicForceFeedback
(
    float Intensity,
    float Duration,
    bool bAffectsLeftLarge,
    bool bAffectsLeftSmall,
    bool bAffectsRightLarge,
    bool bAffectsRightSmall,
    EDynamicForceFeedbackAction::Type Action,
    FDynamicForceFeedbackHandle ActionHandle
)

Remarks

Allows playing of a dynamic force feedback event from native code Begins playing when Start is called. Calling with Action set to Update or Stop if the feedback is not active will have no effect. When Update is called the Intensity, Duration, and affect values will be updated

Returns

The index to pass in to the function to update the latent action in the future if needed. Returns 0 if the feedback was stopped or the specified UniqueID did not map to an action that can be started/updated.

Parameters

Parameter

Description

Intensity

How strong the feedback should be. Valid values are between 0.0 and 1.0

Duration

How long the feedback should play for. If the value is negative it will play until stopped

bAffectsLeftLarge

Whether the intensity should be applied to the large left servo

bAffectsLeftSmall

Whether the intensity should be applied to the small left servo

bAffectsRightLarge

Whether the intensity should be applied to the large right servo

bAffectsRightSmall

Whether the intensity should be applied to the small right servo

Action

Whether to (re)start, update, or stop the action

UniqueID

The ID returned by the start action when wanting to restart, update, or stop the action

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss