Lines aren't currently implemented in Babylonjs. The author suggests creating a triangle where you want the line. More here... http://www.html5gamedevs.com/topic/2235-draw-a-line/#entry15013
BabylonJS Drawing a Line
-
03-08-2022 - |
Domanda
I am currently attempting to trace the path of an object in BabylonJS.
To do this I would like to draw a line between the existing location and the previous location.
The closest I've been able to come is a cube.
var plane = BABYLON.Mesh.CreatePlane("Plane", 50, scene);
Here is a link to one of the tutorials, but none of them talk about lines.
Does anyone know how to draw a line using BabylonJS?
Soluzione 2
Altri suggerimenti
BabylonJS can do lines now... and much, much more!
http://doc.babylonjs.com/how_to/how_to_use_curve3
https://doc.babylonjs.com/babylon101/parametric_shapes
http://doc.babylonjs.com/how_to/how_to_use_path3d
:)
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow