Skip to content

GhostWalker562/Godot-Haptic-Feedback-Module-IOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Godot Haptic Feedback module - iOS

Today, many apps are following a haptic feedback craze, so why not get your hands on the ability to do so? I'm providing a haptic feedback module for Godot, only for iOS.

For more information of feedback, https://developer.apple.com/documentation/uikit/uifeedbackgenerator

Hello! Thanks for checking out this module, I spent quite a time learning how to make the module so if you would like to lend a few bucks to a young programmer, I'd greatly appreciate it :D

Click me to Donate!

How to use

  • Download the zip file
  • Place the "haptic" directory into your "module" directory in the Godot engine.
  • Export your iOS project normally by using the template provided by Godot themselves.
  • Put the template provided into the iOS export and rename it to replace the previous .a file. Export Screenshot
  • haptic haptic haptic!

API Refrence (iOS)

The following methods are available:

# Makes the device trigger a selection feedback
selection()

# Makes the device trigger a impact feedback
# @param int feedback_style declares the style of feedback, 0 - light, 1 - medium, 2 - heavy
impact(feedback_style)

Example in GD:

# Creates an instance of Haptic
var hap
if Engine.has_singleton("Haptic"):
  hap = Engine.get_singleton("Haptic")
hap.selection()

Why not Android?

I currently do not know how to code for Android devices.

Donate - Thank you!

Donate

About

🦾 A Godot Haptic Feedback module for iOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors