Haptic Manager Module

Hey guys, I made a module which can add extra immersion inside your games, and I decided to share it here to (probably) help people that needs it.

The module is called “Haptic Manager”, which basically adds some more features for immersion.
You can get the module here.
Edit: You can test the physics function in this place.

The module has four main functions:

  1. HapticManager:HapticEvent(), which sets the haptic motor to a specified state. However, you might want to use something else since this is for compatibility purposes.
  2. HapticManager:HapticEventPlus(), which works like HapticManager:HapticEvent() with the addition of being able to choose the gamepad.
  3. HapticManager:HapticEventTween(), which tweens the motor state from Intensity1 to Intensity2.
  4. HapticManager:AttachHapticPhysics(). This is probably the main function you’re looking for, which triggers the motor once an object has impacted the ground, and automatically calculates the time and intensity.

There are also predefined haptic functions, which will definitely speed up your process.

There is an old documentation inside it though, but it’s always recommended that you read the script first to better understand it.

Remember, this module only works for devices with physical motors in them.

I do want to add more features inside it though, for example:

  1. Instance-based haptics (Similar to sounds having MinRolloffDistance and MaxRolloffDistance)
  2. Animation controlled haptics (Haptics set from keyframes, etc.)

But, it’ll probably not be updated for a long period of time until I feel like doing it, since I have lots of other stuff to do.

Anyways, happy scripting!

1 Like

A complete rewrite of Haptic Manager is now available here. It’s not finished, but the code looks nicer, and it has some more features, including the ones that I’ve said I wanted to add.

Feature list:

  1. Setting motor strength
  2. Tweening the motor strength
  3. Sequencing the motor strength
  4. Scripting the sequence
  5. Simulating motor impact (works best in fast-response motors; for example the Apple Taptic Engine)
  6. Importing sequences from NumberSequence
  7. Sound sequence (Using sound as the haptic sequence)
  8. Physics impacts (Simulating impacts using the motors)

Work in progress:

  1. GUI to speed up creating sequences
  2. Crushing bugs or making it a feature instead
  3. Other potential features that I haven’t thought of yet