Camera Control!!
by Alan Murphy · in Torque Developer Network · 05/21/2009 (6:11 am) · 1 replies
Hi, I am doing a project using head tracking to create a 3d effect! I have a piece of software written in C++, which will track head movement through a webcam and returns co-ordinates as to the users head position as regards position and rotation (faceAPI)!Simply, with no character on screen, I am trying to go about using these co-ordinates to control the camera in torque thus creating a 3d effect! I know that I need to control the camera in much the same way as the mouse would using pitch and yaw! I can set the minLookAngle and maxLookAngle to control the pitch and the maxFreelookAngle to control the yaw of the camera ands allow the FOV (Field of View) of the camera control the zooming in and out (moving head in and away from the screen)!
My problem is in encorporating the C++ code with the C script in torque! If you visit my blog at
http://headtrackingthesis.blogspot.com/
I have tracked my progress to date and you can see the software in operation. I simply ran it in Visual Studio C++ 2008. Does anyone have any idea how i could encorporate the two pieces of software?
Would it be possible to have the faceAPI running behind inside my torque project and extract the data from it in there? This seems logical but I am confused as to how to extract the information outputted from the C++ code using Torques C Script! Would really appreciate it if anybody could shine any light on the matter or give their opinion! Thanks! :)
My problem is in encorporating the C++ code with the C script in torque! If you visit my blog at
http://headtrackingthesis.blogspot.com/
I have tracked my progress to date and you can see the software in operation. I simply ran it in Visual Studio C++ 2008. Does anyone have any idea how i could encorporate the two pieces of software?
Would it be possible to have the faceAPI running behind inside my torque project and extract the data from it in there? This seems logical but I am confused as to how to extract the information outputted from the C++ code using Torques C Script! Would really appreciate it if anybody could shine any light on the matter or give their opinion! Thanks! :)
Torque 3D Owner Sherman Pendley