0 votes

I feel like I'm close, but no matter what I change I can't get the button to move my character
It only moves the player a little bit when first pressed, so I would need to spam the left button to move left

func _on_LeftButton_pressed():
  Input.is_action_pressed("ui_left")
  motion.x = max(motion.x-ACCEL, -MAX_SPEED)
  $Sprite.flip_h = true
  $Sprite.play("Run")

I'm very new to Godot and game making in general
I could skip trying to get it to work on android, but I kinda got the want to just make a platform runner, so why not
I just need to be able to move my player so here I am :shrug:

in Engine by (35 points)

In the Inspector of TouchScreenButtons there is the choice :Action

For the left moving, in Action frame type: ui_left .

For the right moving, in Action frame type: ui_right .

1 Answer

+1 vote
Best answer

Watch this might be useful
https://youtu.be/gylnwemFIZc

by (161 points)
selected by

DAMN IT!
I was nooo where close!

Worst of all, it was soooo simple! I just needed to set up the action in properties to ui_right/left/up

HOW DID I NOT FIND THIS?!
I searched all over the place

This guy has an opacity option
Has this been moved/removed in newer versions of Godot?

Dunno I have not done any thing requiring it before

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.