This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Hi,
I'm using visual script, and thus I'm wondering how I could acces the joystick input, for instance in order to move the caracter as I move the joystick...

keybord acces is well documented, but I couldn't imagine for joystic (nor mouse)

any clue ? Thanks

in Engine by (50 points)
retagged by

2 Answers

+2 votes
Best answer

You can do so by creating a Call node, calling the get_axis function on the Input singleton:

enter image description here

There is a wide choice of axes to choose from in GlobalConstants. For example, JOY_AXIS_0 seems to map to the horizontal value of the left stick.

by (29,510 points)
selected by
[SOLVED] How to get mouse input using VISUAL SCRIPT
0 votes

Great, thanks Zylann
it works perfectly.

would you know also for mouse position ?
Thank you

by (50 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 Frequently asked questions and 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 [email protected] with your username.