Attach Line to Node

Somebody please help me, I cannot attach Line to Node please see the following code



Node BattleGrid = new Node(“battlefield”);

Line BattleLine = new Line(new Vector3f(0,1,1) , new Vector3f(2,3,3));

BattleGrid.attachChild(BattleLine);

Line is a mesh you can’t add meshes to a node.

You need to create a geometry from your mesh and then attach the geometry to the node.



Node BattleGrid = new Node(“battlefield”);

Line BattleLine = new Line(new Vector3f(0,1,1) , new Vector3f(2,3,3));

Geometry geo=new Geometry(“BattleLine”, BattleLine);

BattleGrid.attachChild(geo);

Thank nehon for suggest me