0

* SOLVED *

It was not about 0,0,0 or distortion. It´s super weird but I found out that compute geometry as a Sphere worked! (even at the tiles corners, where you should think a sphere wouldnt cover it does)

http://threejs.org/docs/#Reference/Core/Geometry

computeBoundingSphere();

Problem desc. follows below.

Hey I'm building a webgl wall for my portfolio site, I need ray intersection to know both when user hovers over the wall and when they click what plane they're clicking on so I can redirect them to correct project.

http://www.martinlindelof.com

What i do is adding all planes on xyz(0,0,0) then I'm using dynamic geometry to place out their vertices on a point grid that's affected by a repelling particle (using traer)

now when I'm doing ray intersect (using examples from threejs r49) I get an empty array back, nothing hit.

could this be because all planes origins are in 0,0,0. should I maybe on each frame not only moving vertices but the entire plane?

or is something else.

(face normals seems to be pointing in the right direction, I see the texture on the plane and it's not inverted as it should be if it was the face backside with double sided planes. guess it's not by default in three.js when creating plane)

Olivier Moindrot
  • 27,908
  • 11
  • 92
  • 91

1 Answers1

0

Ray got problems with object position 0,0,0 (because somewhere will be divided by position and will result in not dividable). Try another position.