-
Notifications
You must be signed in to change notification settings - Fork 2
ForceTubeVR Integration
This Section contains a simple example for how to integrate ForceTubeVR to work with the plugin.
Grab any version of ForceTubeVR Unreal Engine Plugin that works with your project and activate the plugin in the editor.
Create a new Blueprint that inherits from TVRGunHapticsComponent.

Implement the functionality. Make sure that some operations are only executed for the owner. For example during Begin Play, we only want to activate force tube VR if the controller is the local controller. Most of the other events actually have a Client Only wrapper when calling them, which ensures that the function is executed on the owning client, to allow to to keep your implementation simple.

Add this new component to your Player Controller. TVRPlayerController has a function GetGunHapticsComponent that automatically looks for this component. But you can override it, in blueprint to make it directly access the component instead of searching for it, which can save some performance.
Select the Gun Fire component of you gun. Ideally you do this in a base class/blueprint, that other guns inherit from to make maintanability easier.

Activate the flag Use Gun Haptics Buttstock.
