Description

Calling PlayDynamicForceFeedback in code does not affect controller rumble.

Steps to Reproduce
  1. Connect XBox controller to the computer
  2. Open UE4 Editor (any project)
  3. Create new class based on PlayerController (MyPCClass)
  4. In MyPCClass.h, add the following:
    public:
    	UFUNCTION(BlueprintCallable, Category = Test)
    		void Rumble();
    
    	FLatentActionInfo actionInfo;
    
  5. In MyPCClass.cpp, add an include statement for Engine.h as well as the following:
    void AMyPlayerController::Rumble()
    {
    	if (GEngine)
    	{
    		GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Yellow, TEXT("OWhytr"));
    		PlayDynamicForceFeedback(1.f, -1, true, true, true, true, EDynamicForceFeedbackAction::Update, actionInfo);
    	}
    }
    
  6. Compile the code
  7. In the editor, add blueprint based on MyPCClass (MyPC) and blueprint based on GameMode (MyGM)
  8. In world settings, set GameMode Override to MyGM and Player Controller Class to MyPC
  9. Open MyPC blueprint and add call to Rumble function
  10. Wire Event Begin Play to Rumble node and compile blueprint
  11. PIE

Result:
AddOnScreenDebugMessage appears but the connected controller does not rumble

Expected:
Calling the function from code functions the same as calling the blueprint node.

Repro Attempt #: 3/3

Have Comments or More Details?

Head over to the existing AnswerHub thread and let us know what's up.

0
Login to Vote

By Design
ComponentUE - Gameplay - Input
Affects Versions4.10.44.11
Target Fix4.12
CreatedFeb 25, 2016
ResolvedMar 2, 2016
UpdatedApr 27, 2018