Hello boxers! I'm making a very simple game for children. The player has to drag an Object1 onto an Object2. If he is unable to place Object 1 on top of Object2, Object1 must return to the starting position. If he succeeds, Object1 should play a sound, spin and disappear. I can do all of this, except return it to the starting position, in case the player is unable to place Object1 on top of Object2. Could you help me with that? Thank you!
Hey there, If you are having troubles with this I suggest you to do the following: - when the user moves an object (on touchBegin ) save that object position (this.entity().position) - when released (on touchEnd) check if the position is correct i(additional logic followed here) otherwise move the entity to it's original position that you saved on touchBegin Following this simple rules would help you achieve your expected behaviour
Hello Vlad! Thank's for your time! This ("touchBegin", "this.entity (). Position", "touchEnd" etc.) seems to be EXACTLY what I need. That's the logic! However, my programming knowledge is very poor and I have no idea where I would do this implementation. If you can give me any directions or tips, I will be extremely grateful.