I am trying to set a clip plane for walls and other items that are behind a third person actor in an attempt to prevent them from blocking the camera when rotating the actor.
self.camLens.set_near(x) almost does exactly what I want. I tried nudging the x value up until I got the desired effect, but at that point some strange/undesirable visual effects are also introduced. So I am now attempting to do it myself with a clip plane. I have four vertical clip planes that are created similar to the below example:
clip_plane_east = Plane((8, 0, 0), (8, 0, 1), (8, 1, 0))
clip_plane_east_node = PlaneNode('plane-east', clip_plane_east)
clip_plane_node_path = self.render.attach_new_node(clip_plane_east_node)
clip_plane_node_path.show() # shows the plane's location/boundaries for testing
self.render.set_clip_plane(clip_plane_node_path)
Is there a way to toggle it from active to inactive and vice versa? I don’t mean clip_plane_node_path.show()/clip_plane_node_path.hide() to show the boundaries/grid for testing. I want to know how to remove the clipping plane and then put it back to toggle the parts of the render that I want to be visible/invisible.
I thought about just removing the node and adding it back, but I can’t seem to find it in the tree with self.scene.ls() or with .find() - clip_plane_node_path prints ‘render/plane-east’.
Thanks!