0 votes

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

asked Jan 24, 2018 in Engine by Nico_fr (50 points)
retagged Mar 13, 2018 by Nico_fr

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.

answered Feb 19, 2018 by Zylann (27,004 points)
selected Feb 20, 2018 by Nico_fr
[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

answered Feb 20, 2018 by Nico_fr (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 How to use this Q&A? before posting your first questions.