How to Move 2D picture without scaling the size? How to do Hand Recognition?
Dear All,
I would like to move a 2D Sprite image when user drag their finger to a position.
I have used the templates, it allow me to move the 2D image, however, the picture size reduce when I move up, and the size increase when I move down, since it is in a 3D space.
How can I simply transform the position of a 2D Sprite by detecting user's finger and update the picture to the finger position? Thank you.
Second, I saw an Official Snapchat App being able to detect user's hand. When the hand is detected, a heart will stick to the hand. When the hand lost detection, the heart will blow away and disappear.
I want to be able to do something similar. I want to attach a 2D picture on user's hand when snapchat detects the hand.
How can I do that?
I tried to follow the new templete "Marker", and set the hand as a marker. However, the hand image is too simple to be used as a marker.
Thank you.
Hi Vincent!
There's multiple ways to get your object to be manipulate-able on a 2D plane.
The easiest way is to rotate the parent object of the object with the Manipulate component 90 degrees, take a look at this guide to learn more: https://lensstudio.zendesk.com/hc/en-us/community/posts/115020451423/comments/115005538003
However, this has the limitation that the user will need to drag the object (if the user just taps on an empty area, the object won't move there). If you want the user to be able to tap anywhere to start dragging, take a look at this solution which uses the event system to figure out where the user has touched: https://lensstudio.zendesk.com/hc/en-us/community/posts/360018308143/comments/360000810363
Currently we don't have hand tracking available yet. I will pass it on to the developers that this is something that our users want!
Let me know if you have any other questions. Can't wait to see what you come up with.
Cheers,
Jon
Dear Jon,
Thank you so much for your help, I have successfully finish it. However, there is an obstacle right in the middle of the screen, hence, when I drag the object to the middle, I have to go around it.
How can I make the obstacle disappear? Thank you. The dropbox link is my lens studio project.
https://www.dropbox.com/s/k8926c72a974tvp/Problem.zip?dl=0
Furthermore, I have added a 2D sprite and 3D mesh to the head binding. However, I want the object to tilt according to gravity when the head tilt. Without gravity, the tear object looks unnaturally hanging. Is it possible to accomplish? Thank you. The top of the red line will fix in the eyeball and do not move in any circumstance. The bottom of the red line will tile according to gravity.
For the hand recognition, I wonder how the official lens accomplish this effect? As seen in below photo, the heart is attached on the hand, the heart will tilt as the hand tilt, the heart will reduce size as the hand become smaller, the heart will disappear when the hand disappear. Thank you so much.
Hi Vincent!
You're close. Try adding this script on Initialized to the object that contains the manipulateComponent. Then, in your Inspector panel, click the Manipulate Component field and assign your manipulate component.
One thing you can do, is just copy the position of your head binding without copying the rotation. Travis posted a sample project of the way to do this here: https://lensstudio.zendesk.com/hc/en-us/community/posts/360012160626/comments/360000614203
As for the hand tracking, our internal team is using a slightly different tool to achieve the effect. As it stands, Lens Studio does not currently offer the ability to track objects to hands, but I've already informed the developers that you (in addition to Calvin and Alexis) desire such a feature.
Let me know if you have any additional questions! Can't wait to see the final project.
Cheers,
Jon
Dear Jon,
Thank you so much, they works perfectly in my lens.
Sorry for having another question.
1. Is there anyway allowing user to select a photo from their phone album, and I apply head binding (face detection) on that photo, so I can display object or makeup on the face of the photo? The photo will occupy the full screen.
Since I saw someone able to make a lens allowing user to select a photo from their phone album and put it in the AR world.
2. Is there any way I can detect 2 people's face characteristics and generate how their baby may looks like according to their eye, mouth shape etc?
3. Is it possible to help a 60 years old lady looks like she is 25 years old? I have used face stretch, face paint, face retouch, post effect etc already.
But I'm thinking of simply extracting her eye, mouth characteristics and change to a beautiful new face.
Thank you so much for your help :) You are really professional!
Regards,
Vincent