0 votes

Hi!
I want to be able to use the arrow keys (ui_up, left, right and down) and WASD to move in my game. I can't however, have more than one mapping in this code:

inputvector.x = Input.getactionstrength("keyd") - Input.getactionstrength("keya")
input
vector.y = Input.getactionstrength("keys") - Input.getactionstrength("keyw")

key_d, a, s and w are custom mappings and are bound to the appropriate key.
I'm quite new so this may be super simple.
Thanks for any help in advance!

Godot version 3.3.2
in Engine by (12 points)

Please log in or register to answer this question.

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.