'How can I turn off A-frame Camera Occlusion Culling?

Occulusion culling occurs when positioning the .gltf model and moving the camera.

I want to control this, but even though the camera's near value is set to the minimum value of 0.001, the object keeps culling in view. How shall I do it?

When I'm a little far from the object When I'm a little far from the object

When I got closer to the object When I got closer to the object



Solution 1:[1]

This component should fix the problem. Then add it to your entity.

AFRAME.registerComponent('no-cull', {
  init() {
    this.el.addEventListener('model-loaded', () => {
      this.el.object3D.traverse(obj => obj.frustumCulled = false)
    })
  },
})

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ian