How do I move an object with the movement of my head?
I need to move an object with the movement of my head, for example a glasses in my eyes. Can anyone help me? Thanks
Answer by PPenar · Mar 22, 2017 at 09:16 PM
From tags I see that you want to use your webcam - Try downloading OpenCV for Unity, and its FaceTracker Example use it to recognise your face and then track its position on the webcam stream. Use this information to create a Vector3 and then use it to move the object.
$$anonymous$$y problem is that when I install OpenCV for Unity and its FaceTracker Sample, Unity gives me this problem: Assets/FaceTrackerExample/FaceTracker/FaceTracker.cs(162,29): error CS0117: OpenCVForUnity.Imgproc' does not contain a definition for
line' and i don't know why because I have not touched nothing and also i'm new using this program... could you help me @PPenar?
I didn't buy this asset so I cannot help you. Still, you can double-click on the error message to see where the error is, and in visual studio try to right-click on the underscored code, and select Quick Actions and Refactorings. Image processing is a pretty advanced topic for a beginner in Unity - maybe try to start with creating simple 2D/3D platformer first, and then work your way to image processing?
Your answer
![](https://koobas.hobune.stream/wayback/20220612113740im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Problem with FaceTracker 0 Answers
Help with FaceTracker 0 Answers
Help with Visage SDK facial tracking 0 Answers
How can i do a virtual tester? 0 Answers
Face direction of a Vector 3 1 Answer