Make gamepad vibration work on web export
Input.start_joy_vibration() is a documented engine no-op on Godot's HTML5 export (never wired to the browser side). Controls.vibrate() wraps it: native platforms go straight through as before, web drives the browser's Gamepad Haptic Actuator API directly via JavaScriptBridge. Gamepad movement/ability input already worked on desktop browsers via the standard Web Gamepad API, so only vibration needed a fix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MXBNaEBmrYDSMcv4NgUWtV
This commit is contained in:
@@ -11,5 +11,4 @@ func _process(_delta: float) -> void:
|
||||
if Run.bear_gate_open() or DP.b("gate_unlocked_bear"):
|
||||
bear_gate_open = true
|
||||
$AnimationPlayer.play("Gate_opening")
|
||||
if DP.b("gamepad_vibration"):
|
||||
Input.start_joy_vibration(0, 0.5, .5, 7)
|
||||
Controls.vibrate(0, 0.5, .5, 7)
|
||||
|
||||
Reference in New Issue
Block a user