Reputation: 23
Unity: I want to push a picture up with a finger keeping touch the screen, and the picture should move with the finger at the first time when this gesture begin. Just move y position, but don't change x.
public void CallEvent() {
case GestureState.Up:
if(this.gameObject.name == "Cover") {
this.transform.DOMove(new Vector2(0, _MousePos.y), 0.5f);
}
break;
}
I refresh this method each time when finger moving is detected, the object is also moved but not in the way I wished. Actually the x and y positions are quite far away from where its should be.
Upvotes: 0
Views: 638