playMaker

Author Topic: how to make keyboard control transform to screen control?  (Read 148 times)

bbs950064

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
how to make keyboard control transform to screen control?
« on: April 06, 2021, 10:26:37 AM »
I have an asset that can move the car by pressing the WASD of the keyboard (just like a normal car operation), but the project I am working on wants to work on a mobile phone, but I don’t know how to make me press on the screen Button is equivalent to W forward on my keyboard

Weak Interactive

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 33
    • View Profile
Re: how to make keyboard control transform to screen control?
« Reply #1 on: April 06, 2021, 01:59:01 PM »
I'm not 100% sure, but I think that touch input would need to be integrated into the asset you're using.

I don't think you can have touch input simulate a key press, so you would need to code the touch input to actually do the action you need, which is tied to the asset you're using.

I'm really not experienced on the topic though, so you might want to include more details, like which asset you're using, so that someone else might be able to help.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6182
    • View Profile
    • jinxtergames
Re: how to make keyboard control transform to screen control?
« Reply #2 on: April 08, 2021, 10:00:25 AM »
Hi.
On the Ecosystem there is a UI Joystick Sample, but this simulates a axis stick.

IF you want buttons then you can use canvas images and use "UI On Pointer *" actions.

and use them where you used the Key Down/Up actions