Dashed Extruded Lines

https://playground.babylonjs.com/#AMTCWG

I was trying to couple dashedLines with an extruded shape to make a dashed extruded line.

I keep getting an error of this._curve(e+t) is undefined.

_curve is not in my code so I assume I am passing something funky to babylon. What gives and how do I fix this?

From https://doc.babylonjs.com/api/classes/babylon.meshbuilder#extrudeshape

The parameter path is a required array of successive Vector3. This is the axis curve the shape is extruded along.

The parameter you are passing lines is a completely different object

Object { state: “”, metadata: null, reservedDataStore: null, _doNotSerialize: false, _isDisposed: false, animations: , _ranges: {}, onReady: null, _isEnabled: true, _isParentEnabled: true, … }

Since extrudeShape is not designed to do what you want you will need to design your own code.

You could try an extrudeShape on your myPoints and then have material that is part transparent to apply o your extrusion and adjust with uScale and vScale.

Something like this but with a bit more care https://playground.babylonjs.com/#AMTCWG#1

1 Like