how to allow user to move and scale 2d object
i simply want the user to be able to move and scale a simple 2d object on the screen (like s sticker). i added the image, but it is not allowing me to move it i the snapchat app. i know how to move it within lens studio, but i want the user to freely be able to move it.
seems fairly simple, but i'm at a loss.
thanks.
hi Merrick Brown
have a look at the guide of Manipulation
if you need any clarification please let us know
Cheers.
Hey @...
This can easily be done by using "Manipulation". "Mohamed Ouahbi has sent you a link , there is a very good tutorial :D
Cheers,
SirQu3ntin
thanks for the reply. this nice, but i am still having trouble moving the object up and down. i don't want it to move forward and backward in the scene. i simple want it to be able to move and be scaled on a 2d plane. it should basically function as an instagram sticker. this must be possible? thanks again for the help.
Hey! Exactly a year later and I have discovered this thread, trying to do the same thing. I'm a little surprised that there's no event for 2D pinch gestures. It could be something like this:
But instead we are forced into using the manipulate component. I have something half working with a screen image component and a manipulate component. The drag doesn't really work for 2D, like Merrick said. I'm only half way through this, but my approach is to use the scale from the manipulate component, and the touch move from a script event.
Then I guess I'll need to write a bit more script to make sure the position and scale of the screen image will match the bounding box of the 2D element I want to manipulate.
If there's a better way, I'd love to hear it! This approach is a huge pain for something that should be such a simple interaction.
In general, I wouldn't mind using the manipulate component if the drag position worked on screen transforms. For some reason the screen transform position is in 3d space? And only the x value moves on drag? Very strange...
Does this lens match your idea?
>
https://www.snapchat.com/unlock/?type=SNAPCODE&uuid=d5b8ce637d5444a2954bec3e2ccbfe4c&metadata=01
I eventually found this wonderful thing in the asset library - Manipulate Image