- Home /
This question was
closed Feb 08, 2015 at 07:41 PM by
Graham-Dunnett for the following reason:
Duplicate Question
Touching screen region to do something.
Hi
I want to be able to touch a sprite and then do something. I get the error:
Assets/Scripts/Jump.js(19,8): UCE0001: ';' expected. Insert a semicolon at the end.
This is my code:
if(Input.touchCount == 1)
{
Vector3 wp = Camera.main.ScreenToWorldPoint(Input.GetTouch(0).position);
Vector2 touchPos = new Vector2(wp.x, wp.y);
if (collider2D == Physics2D.OverlapPoint(touchPos)){
jumped = true;
jumpspeed = 6;
}
}
Comment
Follow this Question
Related Questions
3 java errors on a basic shooting script? 2 Answers
scripting colliders errors 1 Answer
C# Error with if statement 1 Answer
Strange Error in JScript when using "delete" 4 Answers
Error UCE0001 ';' Expected. 1 Answer