How to Move or rotate 2D, 3D image in hand recognition without scaling the size?
I used the hand template to add a 2D and 3D photo onto the hand.
However, how can I move the position of the 2D and 3D photo when user drag their finger to a position?
Also, is it possible for user to rotate the image slightly (e.g. 10 degree) using some command? e.g. two finger rotating.
Something similar to this link, but I fail to make it work on 2D and 3D hand template.
Thank you so much.
2. Second question is, is it able to detect when I flip my hand?
So. I can showcase an image when my hand in facing front, and show another image when hand is facing back.
At this time there are no function call backs for like pinching or some other hand commands. You can only get the position and scale and also rotation of the bounding box of the hand and then attach an image to it.
The only call back is available right now if onObjectFound or onObjectLost. As you can see in the Hand Template we used those callbacks to animate the Hand model on the forehead.
For your second question the answer is no. At this time back and front of the hand detected as a hand and theres no way to change the image based on the hand facing.
Hope you find this helpful.
As in the hand template, there is a place to modify the Offset X, Offset Y and Rotate.
I want to modify this three values. E.g. for something simple, can I make a button, whenever the button is tapped, then the value of Offset X increase 0.1?
If the above is possible, can we make it more advance as the following script? When the user tap and drag the image, the lens detects the user finger position, and update the Offset X as the new position.
Thank you so much.
I created a project file for you that is show you how to create a simple touch controller for hand template.
Swiping left or right will scale down and scale up the Image component and swiping up and down will rotate the Image.
When you open the template take look at TouchController.js. I commented out everything and should be easy to understand.
Hope this will help you.
Thank you for your project file. It is a great help to me!
I am looking for an improvement. Is it possible for the object to move to the exact position on user's finger touching position? Same as the below source.
Since right now, it is hard for users to control the position of object.
Second, I am thinking a better way for user to rotate an object.
is it possible to detect a two finger touching and moving clockwise, or anti-clockwise?
So we can use this common gesture for user to rotate object?
We dont support finger tracking at this time so there's no way to exactly attach an object to finger however you can edit the position in 2D editor to be close to the fingers.
Hope you will find this helpful.