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.
Why Should You Use It?
-
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.
-
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.
-
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?
-
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.
-
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.
-
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.
-
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