move 2D objects on 2d plane
Hi!
im trying to create a game in which i can control my 2d player with my finger, by moving it around my screen or on y axis of the screen using fingers
please help!
and also https://support.lensstudio.snapchat.com/hc/en-us/community/posts/115020451423-How-to-make-a-draggable-billboard-object-?page=1#community_comment_115005538003 this didnt help please tell how can i do this
I think my comment here can help you.
https://support.lensstudio.snapchat.com/hc/en-us/community/posts/360048168491/comments/360006863292
Hey Muneeb,
if you look at this example:
You will see that when the user taps the screen, the logger will print out the location of that tap on the screen in x and y coordinates. If you get the transform of the 2D image you want to move with getTransform(), you can set the image's y position using eventData.getTapPosition().y
(Note, you might want to use the Touch Move Event to update the image's position)
Let me know if you have any questions!
Ben