Answer the question
In order to leave comments, you need to log in
Click error?
I try new options for myself to control the object with the mouse.
!!! - Marked a place with an error.
There is this code
if (Input.touchCount > 0||Input.GetMouseButtonDown(0))
{
!!! Swipe();
}
}
private void Swipe()
{
!!! Vector2 delta = Input.GetTouch(0).deltaPosition;
if (Mathf.Abs(delta.x) > Mathf.Abs(delta.y))
{
Vector3 position = transform.position;
position.x += 1.5f * delta.x;
transform.position = position;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question