bigcake
December 26, 2025, 4:07am
1
我试了试area2d和TouchScreenButton节点加上了脚本也不能对游戏内部输入对应指令
有没有什么好的方法呢?
///
JP:
スマホ向けに仮想ボタンを作りたいのですが、Area2DやTouchScreenButtonノードにスクリプトを追加しても、ゲーム内に対応する入力指令が送信されません。これを実現する良い方法はありますでしょうか?
///
EN:
I’m trying to make virtual buttons for mobile, but even after adding scripts to Area2D or TouchScreenButton nodes, the corresponding input commands aren’t being sent to the game.Are there any effective methods to get this working?
Baz
December 26, 2025, 5:14am
2
Did you already try method in this post?
I have created a sample project for the Virtual Pad.
You can download it from the bottom of the page.
Description
In car_scene, a VirtualPad object is placed.
[スクリーンショット 2025-12-25 102428]
I…
bigcake
December 26, 2025, 6:00am
3
I tried it—using the mouse to simulate touch input—but it doesn’t trigger the action.
bigcake
December 26, 2025, 8:42am
4
I haven’t tried the method in the post from this link yet, but I’m going to give it a shot now.
bigcake
December 26, 2025, 2:59pm
5
You’re welcome! I used the nodes from this example to set up the buttons successfully, meow.
1 Like