public void OnDrag(PointerEventData eventData) { newPos = Input.mousePosition + relativePosition; newPos = grid.getGridPosition(newPos); rectTrans.position = newPos; // checkNeighbors (); }
public void OnDrag(PointerEventData eventData) { newPos = Input.mousePosition + shiftPos; newPos = grid.getGridPosition(newPos); // newPos.z = 0; rectTrans.localPosition = newPos; }
public void OnDrag(PointerEventData eventData) { modification = Input.mousePosition - startPosition; // just need difference no need for correction Vector2 newV = grid.getGridPosition(new Vector2(baseWidth + modification.x, baseHeight + (sign * modification.y))); if (newV != Vector2.zero) { modifyShape(newV); } }
public void OnDrag(PointerEventData eventData) { newPos = Input.mousePosition; newPos = grid.getGridPosition(newPos); rectTrans.position = newPos; }