alexa

How too add left right touch controls c# unity in android ?

How too add left right touch controls c# unity in android ?

eg.

 var halfWidth = Screen.width / 2;

var touch = Input.GetTouch(0);
var touchPos = touch.position;

if (touchPos.x < halfWidth)
{
    Debug.Log("Left touched!");
}
else
{
    Debug.Log("Right touched!");
}

254 0
7

Write a Comments


* Be the first to Make Comment

GoodFirms Badge
GoodFirms Badge

Fix Your Meeting With Our SEO Consultants in India To Grow Your Business Online

Facebook
Twitter
LinkedIn
Instagram
Whatsapp
Call Now
Quick Inquiry