eu.vl
eu.vl

Reputation: 192

three.js object intersection

I was trying to make some surface with cubes intersect it, and thats what I am getting. I dont know if it should be like that on the current stage of Three,js development.

object intersection issue

In the dragable cubes example everything is ok. I thought that maybe I am using wrong materials or renderer.

var renderer = new THREE.CanvasRenderer();
var material = new THREE.MeshBasicMaterial({ vertexColors: THREE.FaceColors });

Any suggestions? Thanks!

Upvotes: 1

Views: 601

Answers (1)

Matthias
Matthias

Reputation: 7521

The CanvasRenderer does not use a z-buffer. You should switch to a WebGLRenderer to fix the problem.

Upvotes: 2

Related Questions