Search found 2 matches
- January 5th, 2009, 5:18 am
- Forum: Expression Discussion
- Topic: Calculate angle between Object and Camera in 3D
- Replies: 7
- Views: 31310
Re: Calculate angle between Object and Camera in 3D
Well after some digging around here and there I found some pieces of code here and there. It seems to work a bit. the only thing that I would like to add is the amount of degrees it faces away from the cam. So the more it faces away, to less you see it. //check to see if it is facing the camera if s...
- January 5th, 2009, 2:57 am
- Forum: Expression Discussion
- Topic: Calculate angle between Object and Camera in 3D
- Replies: 7
- Views: 31310
Calculate angle between Object and Camera in 3D
Hi people. I have a comp with a camera, and a layer positioned in 3D. What I would like to do is to move the camera around, and calculate the angle of the object relative to the camera. After some googling I found this piece of code on CreativeCow: C = thisComp.layer("Camera 1"); v1 = norm...