Hey Guys =)
I want to instantiate a Gameobject whenever the Device gets a touch input in form of a Square.
I have this Script that Instantiates an Object whenever the User touches the Screen at all:
var newObject : GameObject;
function Update () {
for (var i = 0; i < Input.touchCount; ++i) {
if (Input.GetTouch(i).phase == TouchPhase.Began) {
clone = Instantiate (newObject, transform.position, transform.rotation);
}
}
but I need a script that detects if the user touches a quad onto the Screen so that then an Object gets Instantiated.
Every answer will be Highly appreciated and thx for reading =)