+2
Answered

touch

Nilson 3 years ago updated by josé eduardo silva muller 4 months ago 11

how do i make a touch input for mobile devices

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
+1

I use Leantouch
https://assetstore.unity.com/packages/tools/input-management/lean-touch-30111
You can trigger very easy unity events to bolt.

Hi, can you take a print screen of how you did it so I could see

+2

I had the same issue with touch input, so i follow the Elin's suggestion.

First, you need import "leantouch" (https://assetstore.unity.com/packages/tools/input-management/lean-touch-30111), then, create a LeanTouch gameObject:


Next, you need to add a component called "Lean Finger Down" to emit an event to your FlowMachine:


and finally, create a unit to catch the event in the graph:


I don't know if there are some other way to do this, but this way works for me now :P

How do you detect which object has been touched or what the coordinates are? This appears to just be an event with no data.

+1

You can use a collider with the LeanSelectable script.

2018_03_21_20_20_57_Unity_2017_2_0f3_Personal_64bit_UK600_26_unity_UK600_V1_1_PC_Mac_Linu


I like the LeanTouch Asset for mobile development.

I can really recommend you to have a look at all the scripts in the package.

Thanks. I copied your example and my Lean Touch script is firing but not the `OnSelect`. Any suggestions? Adding the Lean Tap and firing the same event as above is working fine.

+1

Might be too obvious to mention but have you got a Collider on the object you are clicking?

Have a look at the Press2D in the lean examples and use this as a base.


Thanks, I didn't notice I needed a Lean Tap script to trigger the Lean Selectable.

Hello, I need your help, I'm new to Unity and I bought Bolt a few days ago, I was looking for a tutorial on how to work with the touch function (mobile device) inside Bolt, but I haven't found anything yet, if anyone has a tip ... I installed Lean touch, followed the installation steps, described in this topic, but different options appear for me, within the "lean finger down" monobehaviour, could someone help me?,

thanks in advance!

This is my screen
My scre