I’m currently making a word-puzzle game for smartphones that heavily relies on the GUI. It consists of alphabetical letters and a serie of boxes in which the player can put the letters onto. I want the player to be able to drag a letter and drop in onto an empty box. The empty box must be (or has) some kind collider which triggers when something else is dragged onto it.
- (GameObject) Letters have a Rect Transform, Image and RigidBody2D component
- (GameObject) EmptyBox have a Rect Transform and Image component
Normally I’d use a simple BoxCollider2D and it’s OnTriggerEnter2D function, I can’t get the colliders to scale along with the resolution of the screen and I don’t know how to resolve that.
Are there any other ways to see if an draggable object crosses/collides with another UI object?
Btw. I use the new Unity 4.6 UI system!