Get plane face normal

How can I get a Plane Face normals without a raycaster, is it possible?

It is a simple plane…

const geometry = new THREE.PlaneGeometry( 1, 1 );
const material = new THREE.MeshBasicMaterial( {color: 0xffff00, side: THREE.DoubleSide} );
const plane = new THREE.Mesh( geometry, material );
scene.add( plane );

Thank you.

Each face / plane / triangle has two normal vectors - forward and backward facing (which one is rendered depends not on the geometry, but also on the material), unless otherwise specified in the buffers.

Generative geometries from three’s API have normals defined in the buffer - example for PlaneGeometry - and you can retrieve them via BufferGeometry.getAttribute(“normal”).


In addition to what @mjurczyk said, for a THREE.PlaneGeometry you can just use its getWorldDirection method to get the normal vector in global coordinates, because the local coordinates are stuck to (0,0,1), unless you specifically change them in the geometry.


Thank you guys as always this community is the best!

1 Like

Guys maybe you can help me solve this one… because this is why I wanted the plane orientation/normals…