Tag Info

New answers tagged

0

Your xyz position isn't likely to be kept as text so what you don't want to do is try to encode it as UTF8. If you don't need to do anything with the coordinates then you should just turn it into a string before encoding, i.e: string pos = GameObject.Find("Object").transform.position.toString(); byte[] data = Encoding.UTF8.GetBytes(pos); Or if you need to ...


0

When you set the origin you have to take into account the position of the card and its previous origin. card.setOrigin(event.mouseButton.x - (card.getPosition().x - card.getOrigin().x), event.mouseButton.y - (card.getPosition().y - card.getOrigin().y)); I don't really know how to explain, I will try with a drawing. Your card is the red ...



Top 50 recent answers are included