A few engine versions ago, there was a possibility to add haptic feedback effects under Add New -> Miscellaneous -> Haptic Feedback Effect <something>, like below:
This option is missing now:
Where did it go? How do I create haptic feedback on the newer engine version (4.25 but I think the same problem was with 4.24)?
I have the same question, there’s even a haptic effect curve asset in the VR template, so you can copy/paste this to create new curves, but AFAICT there is no way to actually create one from scratch. Huh?
Perhaps they’re trying to quietly deprecate the feature? I read that the feature was built by Oculus, so maybe there’s some politics at play? I’m hoping there’s a replacement brewing but not quite ready? So many questions.
We are also not seeing those haptic options in 4.25.3
I also had this problem and didn’t find it anywhere. However I made a new Virtual Reality feature project and Migrated the Haptic Feedback Effect Curve from there to my project.
I know this is not a real solution but it did work!
Heya, it’s just not exposed from C++ for whatever reason. If you have a C++ project, you can add this to any C++ class and then call it from editor blueprint.
Definitely beats compiling the *bloody *shaders from the VR project for an hour. Also, you can use this to create any kind of asset that isn’t exposed to the editor.
in the header :
UFUNCTION(BlueprintCallable, Category = "Exposing C++")
static void CreateHapticFeedbackAsset(FString Folder, FString Name);
and in cpp file :
void UYourClassName::CreateHapticFeedbackAsset(FString FolderName, FString AssetName)
// Create package to save asset into.
FString FullPackageName = "/Game/" + FolderName / AssetName;
UPackage* Package = CreatePackage(nullptr, *FullPackageName);
// Create asset in the new package.
UHapticFeedbackEffect_Curve* AssetPtr =
NewObject<UHapticFeedbackEffect_Curve>((UObject*) Package, FName(*AssetName), RF_Public | RF_Standalone);
Then right-click in content-browser, create Editor Utilities -> Editor Utility Blueprint -> Parent class “Editor Utility Object”.
Open that, add this in the graph:
Save, right click the Editor Utility Object asset, and click “Run Editor Utility Blueprint”.
Tadaaa! Your asset is now in the folder you specified.
Make sure you have Editor Scripting plugin enabled for this.
Also, I’m attaching a ready-made asset, which will definitely work with 4.25.4, dunno about 4.26.
My VR grenade Project has full haptics for motion-controllers
Hey all - we’re implementing a fix for 4.27 but it can be worked around by downloading the VRTemplate and copying the asset from there. You can then duplicate it when you need to create more.
I’m curious, did anyone submit a bug report for this?
I believe Haptic’s have been broken for a while, I only managed to get them in my projects because of the robo recall mod kit having them.
Well. This thread explains my experience with trying to get haptics working. The solution I am using feels broken, as it bugs out a lot. Finding this solution was a pleasant surprise.
I spent some time debugging a haptics issue, and now that I have a better idea of what’s going on, I figured I’d try to contribute to this thread (this is one of the threads I encountered when I first tried to get haptics working).
When using PlayHapticEffect with SteamVR, it’ll call a SteamVR function (IVRInput::TriggerHapticVibrationAction) once a frame, with the current Amplitude and Frequency. SteamVR expects a duration, so Unreal sets that duration to the duration of a frame (deltatime), so that it can update it again next frame. In my case this caused issues because this system also calls TriggerHapticsVibrationAction with 0 amplitude at the end of the curve, which SteamVR doesn’t seem to like all that much (sometimes).
But that also means you can emulate the effect of PlayHapticEffect by calling SetHapticsByValue every frame. You could use [Miscellaneous > Curve], add it as a variable, call GetFloatValue on it, and use deltatime to increment a custom counter for the “In Time” parameter.
That said, it is quite a bit of code (my example doesn’t even cover all functionality yet), and I’m not sure if this counts as a worthwhile workaround for you. It is also worth noting that if you’re using SteamVR, you’re better off using PlaySteamVRHapticFeedback instead of SetHapticsByValue, because it supports a much higher frequency range (you can just about play music on these controllers), whereas Unreal clamps it between 0 and 1.
It’s been a while since I noticed it was gone, I just thought it was being deprecated for being a Oculus thing in favor of the force feedback since this one seems to be agnostic.