[SOLVED] Line dashed material

im trying to get a dashed line, but failing miserably, heres a fiddle, what am i missing?!

interestigly if i look at old posts like this [one]((LineDashedMaterial does not work ) they too are not showing dashed lines when presumably they where?

clearly im being thick, any suggestions would be appriciated.

Hi!
You have to do it this way now:

line.computeLineDistances();

Call it on a line object (THREE.Line()), not on its geometry.

1 Like

Great many thanks.

To avoid having to ask things like that again, how would one know this has changed? Where should I have looked to realise this? I would have thought it would be menionted on the linedashmaterial docs

You can always rely on the official examples :slight_smile:
https://threejs.org/examples/#webgl_lines_dashed
But you’re right, it should be mentioned in the THREE.LineDashedMaterial() that the method .computeLineDistances() has to be called on THREE.Line() (or another related) object.

1 Like