Copy link to clipboard
Copied
I am working on a project about exporting AE animation data to webpage, when I try to get camera parameters. Normally I can get the coordinate of the 'target point' from the camera directly, but when i rotate the camera, the 'target point' keep moving but the parameters not change, how to get the real position of a camera's target point via expression or scriptingļ¼
Copy link to clipboard
Copied
Unless you care for a whole lot of complicated math that re-creates the entire logic as expressions, simply use a two-node camera with a separate Null as the target. There's really no good way to go about it since the relevant matrix functions from the API are not avialable in the expressions. Otherwise you'd have to create a nested construct that converts the rotation to a vector and then you can calculate the world position of the point with toWorldVec() and similar with all the potential caveats like angles flipping around after the Euler conversion.
Mylenium
Copy link to clipboard
Copied
Thanks for replying Mylenium!
I am trying to recreate the camera (woth other animated layers) in the web, so I may have to do the calculation. Oh no, math:(
Copy link to clipboard
Copied
AE is the wrong tool for creating web-based animations with a camera. You should be using Adobe Autition.