Virtual Gamepad smaller

#1

I wonder if it is posible to do the virtual gamepad smaller, It takes up too much space on the screen.

0 Likes

#2

I don’t even know how to draw the virtual joystick on the screen :thinking:
Could you teach me?

0 Likes

#3

Here you have an example

Properties > scene > Armory Traits > Add - Bundled, select class “virtual gamepad”.

Now you can use logic nodes concerning gamepad

1 Like

#4

Thanks a lot :blush:
I wonder why ‘edit script’ doesn’t work. Shouldn’t it be one possible way to make gamepad smaller?
Append

0 Likes

#5

Did you check if the file was correctly copied to the Sources/arm folder in your project? (That’s what that button does), sometimes it fails to copy it because it doesn’t detect that the folder structure is not correct:
– Sources/
*- Main.hx
*- arm/

I did a quick fix in a pull request in the original file that might help the problem.

You can click on Edit Script and copy and paste the code from the link and replace the one that appears in the editor and then after saving click “Refresh” in the editor inside Blender.

That should show two variables radius and offset, you can play with those to get better results. Or you can edit those values directly in the code editor also.

Something I was thinking that is missing is profiles so at certain resolutions the values are different, or maybe a flag to allow making the values proportional to resolution, so they always fit the same way in different resolutions. I might look at it later when I have some extra time.

0 Likes

#6

Do you have kode studio installed? Kode studio is ide and clicking Edit script should open kode studio.

0 Likes