My 3D model is clipping when the camera moves

Add the no-cull component to your entity (the code for this can be found in the example project here: https://www.8thwall.com/playground/joystick-movement/code/app.js#L12)

Hey there, i included this snippet but my model proceeds to clip when i move the camera certain positions. This also happens in the viewport inside the browser before building the app. any thoughts on how to avoid this?

Hi @Sean_Burns

You need to add this to your app.js

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

Then make sure to add the component to the specific entity that is clipping

  <a-entity
    id="character"
    gltf-model="#your-model"
    no-cull
  ></a-entity>
1 Like