Update Camera Plane

Hello to all,
I want to display data in the model, and I would like display the data always parallel to the plane of the camera. Right now I grab the plane of the current document, but I dont know how to keep updating the code when the user orbit or change the view.

Rhino.RhinoDoc doc = Rhino.RhinoDoc.ActiveDoc;

Vector3d vecX = doc.Views.ActiveView.ActiveViewport.CameraX;
Vector3d vecY = doc.Views.ActiveView.ActiveViewport.CameraY;

 pl = new Plane(ptOrigin, vecX, vecY)

thanks in advance,
kind regards

Hi Carlos,

Is this what you are looking to do?


– Dale

Hi Dale,
Thanks for answer.

What I need is to tell the code when the camera is updated. maybe with a timer, don’t know. so every time the camera change I update the plane pl.

I should say it is for a GH component.

thanks a lot

Using a display conduit, the viewport decoration will be updated every time the camera changes. Run the code and you will see…