About 'Haptic Feedback Effects'!

  • Haptic Feedback Effect curves.
  • Playing the effect on hand controllers.

(Unique Video Reference: 23_AE_VR2)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

Had trouble with the Controller->PlayHapticEffect with version 4.23 because the second method you pass in is an EControllerHand which is no longer used to set the hand for the controller, it uses an FName instead. “EControllerHand::Left” instead of an actual Enum. So, in the header file, I created a new private variable:
EControllerHand MCHand;

Now, in the SetHand() function, I set MCHand based off of the FName that is passed in:
void AHandController::SetHand(FName Hand)
{
MotionController->SetTrackingMotionSource(Hand);
if (Hand == “EControllerHand::Left”) {
MCHand = EControllerHand::Left;
}
else {
MCHand = EControllerHand::Right;
}
}

Now, I can set up the Haptic effect from the lecture with:
Controller->PlayHapticEffect(HapticEffect, MCHand);

It works with both hands.

2 Likes

You should just be able to pass in HandController->GetTrackingSource() which would return the EControllerHand you originally set up the hand controller with.

1 Like

I find the whole getting player controller quite cumbersome. Some of the other lectures (can’t remember if it was this course, the original UE4 course or the remastered course) use UGameplayStatics::GetPlayerController() instead. Any real disadvantage to that?

Privacy & Terms