Is there a way to get two items to snap together?

(Cris) #1


I am trying to design some children’s games for a book I am doing in iBooks Author. I would like to be able to drag two items together. If they match I want them to click together and not if they don’t match. Is this possible? If so can you point me in the right direction to get it to work?


(Lucky) #2


I modified the code slightly so that they snap together on release

	console.log(' hit '

hittest-1 (16.1 KB)
But if you want something to happen afterwards like an action you’ll need to keep building on that with code, I’m afraid there’s no other non javscript way to do this.

(Cris) #3

Thank you Lucky. That’s exactly what I need. I hope I can figure out how to apply it to my scene.
Much appreciated.