Rotate object to be between camera and center point
Hi, I'm trying to implement a "simple" billiard game where the stick is controlled using Kinect 360's camera. My algorithm is - one of the ends of the stick is where the right hand is and the other end is pointing to a point where the left hand is. This is working fine for stationary camera. Now i want to move camera around the table. I've already implemented moving camera along the sides of the table. The problem is to make the stick move along. This is my awesome paint drawing showing that situation from bird's eye view.
The drawing shows only one point but there are actually 2 of them (2 hands) and they are not perfectly between camera and point (0,0,0) but I think that this simplified problem is a good starting point.
I tried to user transform.RotateAround but it seems like I have a problem to properly measure the angle between camera's vector and right hand's vector. Could you give me any advice how can I solve this problem?