Screen space position of a vertex in python
I'm trying to write a python script to retrieve the screen space location of a given vertex of an object. I'm using a dolly camera. I can get the vertex position in the world coordinate system using body.Geometry().WorldVertex(i), but not exactly sure how to get the screen space coordinate. I could potentially manually build the camera matrix based on its parameters and project the points, but I wonder if there's an easier way.
anomalaus last edited by
@vkazemi will this do the job?
This post is deleted!
@anomalaus I tried this and it seems it only works for the preview camera. When I set output resolution of the scene with scene.SetOutputRes() it doesn't seem to adjust for the difference between the output and preview. Is there a work around?