+1 vote

Hello everyone. Just wanna ask, how can I make my character rotate by using the right analog stick of my gamepad. For example, if I move my stick right my character will turn to its right. If I move the stick left the character will turn left and so on. How can I do this? Any ideas?

I would be happy if I get the solution in detail.

in Engine by (132 points)

1 Answer

0 votes

If you have already assigned an input for moving left and right then select an input (for example right) and click on the plus icon and select joy axis. By default you will get Axis 0 left stick left. Click on that and then you will get a lot of options about chooeing an axis and analog stick. You want your character to move with right analog stick and when you move your stick right. For that, from the options select Axis 2 + Right stick right. Same thing will apply for left

Hope this helps and sorry for bad English

by (60 points)

I don't think I got what I had asked for. I know very well how to set up actions for my controller. You go to the project settings and then in the Input Map tab you set the input actions and blah blah blah. That's not what I wanted. I want to make my character face towards a direction as I move my analog stick. For example if I move my stick to the right my character will not only move to the right but also turn to it's right. I think you got it now.

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.