0 votes

I am making a game for android and I want the phone to vibrate when the player is beaten but I get this error:

Invalid call. Nonexistent function 'vibrate_handheld' in base 'InputDefault'.

My code to when the player is beaten is the next:

func _on_PlayerShip_area_entered(area):
if can_get_damage and !area.get_collision_layer_bit(4): 
    can_get_damage = false

I did follow this thread to get the code I needed to use and the docs to test it, but I don't get more information about this problem.

In advance Thanks for your help.

in Engine by (22 points)

I have the same issue. Not high on my list, so I've commented to see if anyone else replies.
I would have thought vibration would be a built in thing.

Well, it could be a good thing to integrate in some games, sure it is not that important for the most. Les't wait.

1 Answer

0 votes

It might be the phone/tablet your'e using. It works fine for my phone but never worked on my tablet. I'll suggest to try it on another device. Also, maybe it's because of the code. Try to send a vibrate call in the ready function just to make sure. Hope this helps! , also let me know if you find a way to make it work on table ;)

by (18 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.