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:
-
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. -
HapticManager:HapticEventPlus()
, which works likeHapticManager:HapticEvent()
with the addition of being able to choose the gamepad. -
HapticManager:HapticEventTween()
, which tweens the motor state fromIntensity1
toIntensity2
. -
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:
- Instance-based haptics (Similar to sounds having MinRolloffDistance and MaxRolloffDistance)
- 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!