Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

Unity double tap explanation

$
0
0
This is the code given by Unity docs for a double tap that makes a projectile. I would like to learn how this code works and if possible, how I can edit it even further, for example, make it a single tap instead of a double tap. Thanks var projectile : GameObject; function Update () { for (var i = 0; i < Input.touchCount; ++i) { if (Input.GetTouch(i).phase == TouchPhase.Began) { clone = Instantiate (projectile, transform.position, transform.rotation);

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>