Transform controls and clipping planes

Hi. I’m using Transform Controls and clipping planes. It mostly works except that when I turn on the transform controls rotate mode and rotate the drawing, the clipping plane doesn’t rotate with the image. For example, if I have a clipping plane perpendicular to the X axis and rotate about the Z axis, then my clipping plane stays put, meaning it is now at an angle relative to the drawing. Probably very simple, perhaps something to do with world vs local coords, but can someone explain how to fix it? Thanks.

The problem is that clipping planes are always define in world space. They are no 3D objects so they can’t be added to entities like meshes, lines and point clouds. Hence, it is not possible to derive a transformation from a hierarchy/ancestor objects.

So when your drawing rotates, you have to manually update the clipping plane.

So when your drawing rotates, you have to manually update the clipping plane.

Okay, thanks. But how do I do that? I suppose I need to determine the changes produced by an OrbitControls user interaction and then update my clipping plane’s normal. But how?

Some sample code would be awesome. Thanks again.

Oops, sorry. I guess I should have said TransformControls interaction, not OrbitControls.