HapticPulse | Dynamic Haptic Feedback Library

HapticPulse is a powerful library for managing haptic feedback. This library provides developers with a toolkit to deliver dynamic and tactile experiences in their games.

button-roblox button-github button-wally

Why Should You Use It?


  1. Enhance Immersion: HapticPulse offers tactile feedback effects that allow players to dive deeper into the game world, making the gaming experience more realistic and immersive.

  2. Create Emotional Connections: Haptic feedback can help players emotionally connect with the game. The sense of touch enables players to experience events in the game world more intimately.

  3. Improve Reaction Time: HapticPulse provides fast and direct feedback, allowing players to react quickly to specific events in the game. This enhances their ability to manage actions within your game effectively.

Where Can It Be Used?


  1. User Interface Feedback: HapticPulse can be used to provide feedback in user interfaces, such as alerting the player to important events or confirming actions. For example, it can vibrate to alert the player when health is low or when they receive a new message in a game.

  2. Action Games: In action-packed games, HapticPulse can intensify excitement by delivering striking tactile feedback effects. For example, it can be used for shooting, collisions, or explosion effects.

  3. Simulation Games: In simulation games, HapticPulse can provide a realistic experience, allowing players to immerse themselves deeper into the game world. For instance, it can be used for driving, flight simulation, or sports simulations.

  4. Enhanced Interactions: HapticPulse can enrich player interactions by providing tactile feedback for interactions with physical objects, environmental interactions, or character interactions.

And much more!

Usage


  • Import the HapticPulse module
local HapticPulse = require(PathToModule)
  • Create haptic feedback object
local HapticPulse = require(PathToModule)
local largeMotorFeedback = HapticPulse.new(Enum.UserInputType.Gamepad1, Enum.VibrationMotor.Large)
  • Use it however you want!

Type of usage 1:

local HapticPulse = require(PathToModule)
local largeMotorFeedback = HapticPulse.new(Enum.UserInputType.Gamepad1, Enum.VibrationMotor.Large)

-- Note: if you want it to be yield, make the 2nd argument true

-- Play the specified motor for a 1 seconds
largeMotorFeedback:PlayMotor(1) -- Does not yield
largeMotorFeedback:PlayMotor(1, true) -- yields for 1 seconds

Type of usage 2:

local HapticPulse = require(PathToModule)
local largeMotorFeedback = HapticPulse.new(Enum.UserInputType.Gamepad1, Enum.VibrationMotor.Large)

-- Note: if you want it to be yield, make the 2nd argument true

-- Play the specified motor as a Short Vibration
largeMotorFeedback:PlayMotor(HapticPulse.Presets.ShortVibration) -- Does not yield
largeMotorFeedback:PlayMotor(HapticPulse.Presets.ShortVibration, true) -- yields until it's finished

Contributors

@kaan650 @leonbee0

10 Likes

Isn’t this the bzzzz that phones and controllers have (also what devices does this work on)

2 Likes

Roblox supports haptics for the following devices:

  • Android and iOS phones supporting haptics including most iPhone, Pixel, and Samsung Galaxy devices

  • PlayStation gamepads

  • Xbox gamepads

  • Quest Touch controller

2 Likes

I’m trying this on Studio with my Ps4 controller connected, its not working sadly. Does it have to be an actual PS4 console to use for testing or can I still do it with Studio.

Is there a demo place where I can test the haptics on my phone?

1 Like