justinmind-logo
 
Upvote 1

on tap interaction

Answered Van Der.west.ryno 5 years ago

Hi

Is it possible to move an object to the exact position where a person taps? I want to add waypoints to a map?

Regards

Replies (1)
photo
1

Sure - just create an "On Tap" + "Move" event. For the position to move, select 'Calculated' and then drag a cursor constant into the open space in the expression.

c341a6ababcaf4b3dae237209505458b

Check out the attached prototype to see an example.

photo
1

Thank you! It works well, except for the fact that it seems to have an offset to the right of where I am clicking? Or it ends up just to the right of the circle?


One more thing, is it possible to create (or place) a new object every time I click on a new position?

photo
1

We can add another part to the expression to make it move to the center. After the CX/CY just add a '-' and then half the value of the circle's width/height. For example, for a 60x60 circle, it will be CX - 30 and CY - 30.

6aee72e4d51166640e61b0ac9ed88ff1

For your other question, yes, but you will need to have each possible point already created on that screen, but not visible. Check out the attached prototype to see how this works.

photo
1

Thank you very much! Will give it a go! Already figured out the offset in cursor and fixed it, will now try the link

photo
Leave a Comment
 
Attach a file