This VCI vibrates a controller when a grip button is pressed.
You don't need any material to create a vibrating VCI.
Prepare a 3D model based on what you want to create with VCI.
You can easily check this by creating a grabbable SubItem.
Also, set the component as shown below for easy handling.
function onUse(use) -- use stores the name of grabbed SubItem vci.assets.HapticPulseOnGrabbingController(use, 3000, 1) print("Vibrate a controller which used"..use) end
The argument “use” in onUse(use)
contains the name of the used SubItem as a string.
By using the “use” as the argument on the vci.assets.HapticPulseOnGrabbingController(use, 3000, 1)
, you can vibrate a controller with any objects when used.
The second argument specifies the strength of vibration (0~3999); the third argument specifies the length of the vibration. HapticPulseOnGrabbingController
If you want the vibration to occur with a specific SubItem only, you need to separate the process with “if” statement depending on the used SubItem.