void Update()
{
S_x_temp = slot.transform.position.x;
S_y_temp = slot.transform.position.y;
if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved)
{
Vector2 touchDeltaPosition = Input.GetTouch(0).deltaPosition;
if(Vector3.Distance(touchDeltaPosition,slot.transform.position) <= 1)
{
slot.transform.position = new Vector3(touchDeltaPosition.x,touchDeltaPosition.y,10);
cube.transform.position = new Vector3(S_x_temp,S_y_temp,10);
any one could tell me whats going wrong with this touch for android…
all i want to do is when one gameubject is touched then it should change it’s position with second gameobject…
only if the distance between them is 1 or less…
Any kind of help will be much appriciated…Thanks in Advance…if you are posting code then please go for c# if at all possible…Thanks Again You All Rock Cheers And Happy New Year
