現在、キャラクターを表示しているOrientedShape3Dと、キャラクターたちが配置されている地形マップのShape3D両方のAppearanceに app = new Appearance(); RenderingAttributes ra = new RenderingAttributes(); ra.setDepthBufferEnable(true); ra.setDepthBufferWriteEnable(true); app.setRenderingAttributes(ra);
The following two methods enable and disable automatic freezing of the depth buffer for objects rendered during the transparent rendering pass (that is, objects rendered using alpha blending) for this view. If enabled, depth buffer writes are disabled during the transparent rendering pass regardless of the value of the depth-buffer-write-enable flag in the RenderingAttributes object for a particular node. This flag is enabled by default.
getDepthBufferFreezeTransparent retrieves the depth buffer flag.
Transparent objects include BLENDED transparent primitives and antialiased lines and points. Transparent objects do not include opaque objects or primitives rendered with SCREEN_DOOR transparency.